Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ScanNumeric()

void System.Data.ExpressionParser.ScanNumeric ( )
inlineprivate

Definition at line 675 of file ExpressionParser.cs.

676 {
677 char[] text = _text;
678 bool flag = false;
679 bool flag2 = false;
680 while (IsDigit(text[_pos]))
681 {
682 _pos++;
683 }
685 {
686 flag = true;
687 _pos++;
688 }
689 while (IsDigit(text[_pos]))
690 {
691 _pos++;
692 }
693 if (text[_pos] == _exponentL || text[_pos] == _exponentU)
694 {
695 flag2 = true;
696 _pos++;
697 if (text[_pos] == '-' || text[_pos] == '+')
698 {
699 _pos++;
700 }
701 while (IsDigit(text[_pos]))
702 {
703 _pos++;
704 }
705 }
706 if (flag2)
707 {
708 _token = Tokens.Float;
709 }
710 else if (flag)
711 {
712 _token = Tokens.Decimal;
713 }
714 else
715 {
716 _token = Tokens.Numeric;
717 }
718 }

References System.Data.ExpressionParser._decimalSeparator, System.Data.ExpressionParser._exponentL, System.Data.ExpressionParser._exponentU, System.Data.ExpressionParser._pos, System.Data.ExpressionParser._text, System.Data.ExpressionParser._token, System.Data.ExpressionParser.IsDigit(), and System.text.

Referenced by System.Data.ExpressionParser.Scan().