示例#1
0
 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));
     }
 }
示例#2
0
 public override ASTNode VisitStringLiteralValue([NotNull] DaedalusParser.StringLiteralValueContext context)
 {
     return(new StringLiteralNode(GetLocation(context), context.GetText().Replace("\"", "")));
 }