コード例 #1
0
        static Expression BuildLiteral(LiteralSyntax literalSyntax)
        {
            switch (literalSyntax.literal)
            {
            case Integer integer:
                return(new Literal {
                    Value = integer.value, ValueType = "Integer", Span = literalSyntax.span
                });

            default:
                throw new NotImplementedException($"The {literalSyntax.GetType()} is not yet implemented.");
            }
        }