public override void EnterStringLiteralValue(DaedalusParser.StringLiteralValueContext context) { if (!_assemblyBuilder.IsInsideConstDef) { DatSymbolLocation location = GetLocation(context); string value = context.GetText().Replace("\"", ""); DatSymbol symbol = SymbolBuilder.BuildStringConst(value, location); _assemblyBuilder.AddInstruction(new PushVar(symbol)); } }
public override ASTNode VisitStringLiteralValue([NotNull] DaedalusParser.StringLiteralValueContext context) { return(new StringLiteralNode(GetLocation(context), context.GetText().Replace("\"", ""))); }