// "Hello <0>! Waiting game..." public override Node VisitString(DeltinScriptParser.StringContext context) { string value = context.STRINGLITERAL().GetText().Trim('"'); Node node = new StringNode(value, null, Range.GetRange(context)); CheckRange(node); return(node); }
// <"hello <0>! Waiting game...", EventPlayer()> public override Node VisitFormatted_string(DeltinScriptParser.Formatted_stringContext context) { string value = context.@string().GetText().Trim('"'); IExpressionNode[] format = new IExpressionNode[context.expr().Length]; for (int i = 0; i < format.Length; i++) { format[i] = (IExpressionNode)VisitExpr(context.expr()[i]); } Node node = new StringNode(value, format, Range.GetRange(context)); CheckRange(node); return(node); }