mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Add -Z option to print string tree * Simple test to print an AST * Make CompiledScript owner of the tree * some refactoring - rename ecompile.cfg option - rename AST generator class * core-changes, docs * fix warnings
22 lines
401 B
C++
22 lines
401 B
C++
#pragma once
|
|
|
|
#include "bscript/compiler/ast/NodeVisitor.h"
|
|
|
|
#include <string>
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
class AbstractSyntaxTreeStringGenerator : public NodeVisitor
|
|
{
|
|
public:
|
|
AbstractSyntaxTreeStringGenerator();
|
|
|
|
void visit_children( Node& parent ) override;
|
|
|
|
const std::string& tree() const { return _tree; }
|
|
|
|
private:
|
|
std::string _tree;
|
|
};
|
|
|
|
} // namespace Pol::Bscript::Compiler
|