public LiteralExpression(LuaParser.NumberContext context, ScriptLoadingContext lcontext) : base(context, lcontext) { if (m_Value == null) { TryParse(context.FLOAT(), s => double.Parse(s, CultureInfo.InvariantCulture)); } if (m_Value == null) { TryParse(context.HEX(), s => (double)ulong.Parse(RemoveHexHeader(s), NumberStyles.HexNumber, CultureInfo.InvariantCulture)); } if (m_Value == null) { TryParse(context.INT(), s => double.Parse(s, CultureInfo.InvariantCulture)); } if (m_Value == null) { TryParse(context.HEX_FLOAT(), s => ParseHexFloat(s)); } if (m_Value == null) { throw new SyntaxErrorException("unknown number format near '{0}'", context.GetText()); } }
public void ExitNumber([NotNull] LuaParser.NumberContext context) { throw new NotImplementedException(); }
public virtual void ExitNumber([NotNull] LuaParser.NumberContext context) { }
public virtual Result VisitNumber([NotNull] LuaParser.NumberContext context) { return(VisitChildren(context)); }
public void EnterNumber([NotNull] LuaParser.NumberContext context) => DefaultEnter(context);