예제 #1
0
        public override Node VisitString([NotNull] FlyLangParser.StringContext context)
        {
            var text = context.GetText();

            text = text.Substring(1, text.Length - 2);
            return(Literal.From(text));
        }
예제 #2
0
 public override Node VisitIntLit([NotNull] FlyLangParser.IntLitContext context)
 {
     return(Literal.From(int.Parse(context.GetText())));
 }
예제 #3
0
 // Handling Literals:
 public override Node VisitFloatLit([NotNull] FlyLangParser.FloatLitContext context)
 {
     return(Literal.From(float.Parse(context.GetText(), CultureInfo.InvariantCulture)));
 }