public Conditional(Token conditionalType, Ast predicate, ScopeDeclr body, Conditional alternate = null) : this(conditionalType) { Predicate = predicate; Body = body; Alternate = alternate; }
public ForLoop(Ast init, Ast stop, Ast modify, ScopeDeclr body) : base(new Token(TokenType.For)) { Setup = init; Predicate = stop; Update = modify; Body = body; }
public MethodDeclr(Token returnType, Token funcName, List<Ast> arguments, ScopeDeclr body, bool isAnon = false) : base(funcName) { MethodReturnType = new Expr(returnType); MethodName = new Expr(funcName); Arguments = arguments; Body = body; IsAnonymous = isAnon; }
public MethodDeclr(Token returnType, Token funcName, List <Ast> arguments, ScopeDeclr body, bool isAnon = false) : base(funcName) { MethodReturnType = new Expr(returnType); MethodName = new Expr(funcName); Arguments = arguments; Body = body; IsAnonymous = isAnon; }
public ClassAst(Token token, ScopeDeclr body) : base(token) { Body = body; }
public void Visit(ScopeDeclr ast) { Exec(ast); }
private void ScopeDelcaration(ScopeDeclr ast) { MemorySpaces.CreateScope(); ast.ScopedStatements.ForEach(statement => statement.Visit(this)); MemorySpaces.PopScope(); }
public void Visit(ScopeDeclr ast) { PrintWrap("Scope", () => ast.ScopedStatements.ForEach(statement => statement.Visit(this)), true); }
public TryCatchAst(ScopeDeclr tryBody, ScopeDeclr catchBody) : base(new Token(TokenType.Try)) { TryBody = tryBody; CatchBody = catchBody; }
public LambdaDeclr(List<Ast> arguments, ScopeDeclr body ) : base(new Token(TokenType.Infer), new Token(TokenType.Word, AnonymousFunctionName), arguments, body, true) { }
public WhileLoop(Ast predicate, ScopeDeclr body) : this(new Token(TokenType.While)) { Predicate = predicate; Body = body; }
public void Visit(ScopeDeclr ast) { ScopeTree.CreateScope(); ast.ScopedStatements.ForEach(statement => statement.Visit(this)); SetScope(ast); ScopeTree.PopScope(); }
public LambdaDeclr(List <Ast> arguments, ScopeDeclr body) : base(new Token(TokenType.Infer), new Token(TokenType.Word, AnonymousFunctionName), arguments, body, true) { }