import AssignmentNode from "../ast/AssignmentNode"; import ASTNode from "../ast/ASTNode"; import ASTVisitor from "../ast/ASTVisitor"; import ErrorNode from "../ast/ErrorNode"; import { AnonymousFunctionExpr, ArrayLookupExpr, AssertExpr, BinaryOpExpr, EchoExpr, FunctionCallExpr, GroupingExpr, LcEachExpr, LcForCExpr, LcForExpr, LcIfExpr, LcLetExpr, LetExpr, LiteralExpr, LookupExpr, MemberLookupExpr, RangeExpr, TernaryExpr, UnaryOpExpr, VectorExpr } from "../ast/expressions"; import ScadFile from "../ast/ScadFile"; import { BlockStmt, FunctionDeclarationStmt, IfElseStatement, IncludeStmt, ModuleDeclarationStmt, ModuleInstantiationStmt, NoopStmt, UseStmt } from "../ast/statements"; import Scope from "./Scope"; export default class ASTScopePopulator implements ASTVisitor { nearestScope: Scope; constructor(rootScope: Scope); protected copyWithNewNearestScope(newScope: Scope): ASTScopePopulator; populate(n: ASTNode): ASTNode; visitScadFile(n: ScadFile): ASTNode; visitAssignmentNode(n: AssignmentNode): ASTNode; visitUnaryOpExpr(n: UnaryOpExpr): ASTNode; visitBinaryOpExpr(n: BinaryOpExpr): ASTNode; visitTernaryExpr(n: TernaryExpr): ASTNode; visitArrayLookupExpr(n: ArrayLookupExpr): ASTNode; visitLiteralExpr(n: LiteralExpr): ASTNode; visitRangeExpr(n: RangeExpr): ASTNode; visitVectorExpr(n: VectorExpr): ASTNode; visitLookupExpr(n: LookupExpr): ASTNode; visitMemberLookupExpr(n: MemberLookupExpr): ASTNode; visitFunctionCallExpr(n: FunctionCallExpr): ASTNode; visitLetExpr(n: LetExpr): ASTNode; visitAssertExpr(n: AssertExpr): ASTNode; visitEchoExpr(n: EchoExpr): ASTNode; visitLcIfExpr(n: LcIfExpr): ASTNode; visitLcEachExpr(n: LcEachExpr): ASTNode; visitLcForExpr(n: LcForExpr): ASTNode; visitLcForCExpr(n: LcForCExpr): ASTNode; visitLcLetExpr(n: LcLetExpr): ASTNode; visitGroupingExpr(n: GroupingExpr): ASTNode; visitUseStmt(n: UseStmt): ASTNode; visitIncludeStmt(n: IncludeStmt): ASTNode; visitModuleInstantiationStmt(n: ModuleInstantiationStmt): ASTNode; visitModuleDeclarationStmt(n: ModuleDeclarationStmt): ASTNode; visitFunctionDeclarationStmt(n: FunctionDeclarationStmt): ASTNode; visitAnonymousFunctionExpr(n: AnonymousFunctionExpr): ASTNode; visitBlockStmt(n: BlockStmt): ASTNode; visitNoopStmt(n: NoopStmt): ASTNode; visitIfElseStatement(n: IfElseStatement): ASTNode; visitErrorNode(n: ErrorNode): ASTNode; }