Beispiel #1
0
        private Token NextExtendedIdentifier()
        {
            int start = Index++;

            while (!IsEof())
            {
                char c = Code.GetChar(Index);
                if (CharUtils.IsExtendedIdentifier(c))
                {
                    ++Index;
                }
                else
                {
                    break;
                }
            }

            if (Code.GetChar(Index) != ']')
            {
                throw VBSyntaxError(VBSyntaxErrorCode.ExpectedRBracket);
            }

            return(new ExtendedIdentifierToken
            {
                Start = start,
                End = ++Index,
                LineNumber = CurrentLine,
                LineStart = CurrentLineStart,
                Name = Code.Slice(start, Index),
            });
        }