Set() private method

private Set ( string str ) : void
str string
return void
Beispiel #1
0
        private bool DollarDirective_EvalInt()
        {
            long   value;
            double tmp;

            if (DollarEvaluate(out value, out tmp, true) == false)
            {
                return(false);
            }

            idToken token = new idToken();

            token.Line = _scriptStack.Peek().LineNumber;
            token.Set(value.ToString());
            token.Type    = TokenType.Number;
            token.SubType = TokenSubType.Integer | TokenSubType.Long | TokenSubType.Decimal | TokenSubType.ValuesValid;
            token.SetInteger((ulong)idMath.Abs(value));
            token.SetFloat((ulong)idMath.Abs(value));

            UnreadSourceToken(token);

            if (value < 0)
            {
                UnreadSignToken();
            }

            return(true);
        }
Beispiel #2
0
        private void UnreadSignToken()
        {
            idToken token = new idToken();

            token.Line = _scriptStack.Peek().LineNumber;
            token.WhiteSpaceStartPosition = 0;
            token.WhiteSpaceEndPosition   = 0;
            token.LinesCrossed            = 0;
            token.Flags = 0;
            token.Set("-");
            token.Type = TokenType.Punctuation;

            idConsole.Warning("TODO: UnreadSignToken");
            // TODO: token.SubType = LexerPunctuationID.Subtract;

            UnreadSourceToken(token);
        }
		private void UnreadSignToken()
		{
			idToken token = new idToken();
			token.Line = _scriptStack.Peek().LineNumber;
			token.WhiteSpaceStartPosition = 0;
			token.WhiteSpaceEndPosition = 0;
			token.LinesCrossed = 0;
			token.Flags = 0;
			token.Set("-");
			token.Type = TokenType.Punctuation;

			idConsole.Warning("TODO: UnreadSignToken");
			// TODO: token.SubType = LexerPunctuationID.Subtract;

			UnreadSourceToken(token);
		}
		private bool DollarDirective_EvalInt()
		{
			long value;
			double tmp;

			if(DollarEvaluate(out value, out tmp, true) == false)
			{
				return false;
			}

			idToken token = new idToken();
			token.Line = _scriptStack.Peek().LineNumber;
			token.Set(value.ToString());
			token.Type = TokenType.Number;
			token.SubType = TokenSubType.Integer | TokenSubType.Long | TokenSubType.Decimal | TokenSubType.ValuesValid;
			token.SetInteger((ulong) idMath.Abs(value));
			token.SetFloat((ulong) idMath.Abs(value));

			UnreadSourceToken(token);

			if(value < 0)
			{
				UnreadSignToken();
			}

			return true;
		}