public override InoTypeEnum Visit(DeclareAstNode node) { if (node.Symbol.Type == SALTypeEnum.number && IsFirstWalk) { VariableTypes.Add(node.Symbol, InoTypeEnum.undefined); } return(InoTypeEnum.undefined); }
public override string Visit(DeclareAstNode node) { if (node.Symbol.Scope.Depth == 0 && IsLoop) { return(""); } if (node.InoType == InoTypeEnum.undefined) { return(""); } else if (node.Symbol.Type == SALTypeEnum.number) { DeclOrInit.Add(node.Symbol); return(node.InoType + " " + Visit(node.Id) + ";"); } else if (node.Symbol.Scope.Depth == 0 && IsGlobal) { GlobalVariables += Visit(node.Id) + ";" + "\n"; return(""); } return(Visit(node.Id) + ";"); }