Exemple #1
0
        public PToken(PTokenType tokenType, int lineIndex = -1, int startSymIndex = -1)
        {
            TokenType = tokenType;

            LineNumber = lineIndex + 1;
            StartSym   = startSymIndex + 1;
        }
Exemple #2
0
        public PToken(string tokenCode, PTokenType tokenType, int lineIndex = -1, int startSymIndex = -1)
        {
            TokenCode = tokenCode;

            TokenType = tokenType;

            LineNumber = lineIndex + 1;
            StartSym   = startSymIndex + 1;
        }
Exemple #3
0
        public PToken(string tokenCode, int lineIndex = -1, int startSymIndex = -1)
        {
            TokenCode = tokenCode;

            if (PLexer.TokenExists(tokenCode))
            {
                TokenType = PLexer.GetTokenType(tokenCode);
            }

            LineNumber = lineIndex;
            StartSym   = startSymIndex;
        }