X-Git-Url: https://gitweb.ps.run/toc/blobdiff_plain/9610ce88f0b753db81014a053bd3c6d79471c90c..HEAD:/src/repr.h diff --git a/src/repr.h b/src/repr.h index 959e74d..569411c 100644 --- a/src/repr.h +++ b/src/repr.h @@ -8,6 +8,8 @@ using namespace std; +// This contains a 1 to 1 representation of the defined language + struct Type; struct Variable; struct Body; @@ -37,6 +39,9 @@ struct AssignStmt; struct ReturnStmt; struct Stmt; +// Context is a collection of everything that can be defined in a namespace +// that is reused for bodies so that the hierarchy can be walked uniformly +// both up and down using the parent variable struct Context { std::optional name; @@ -184,6 +189,8 @@ struct DotExpr std::string identifier; }; +// OperatorType enum with corresponding string array to lookup +// enum from string and the other way round enum class PrefixOperatorType { Plus, Minus, Increment, Decrement,