AjTalk.Model.ModelParser.ParseBlockLocalVariables C# (CSharp) Méthode

ParseBlockLocalVariables() private méthode

private ParseBlockLocalVariables ( ) : IList
Résultat IList
        private IList<string> ParseBlockLocalVariables()
        {
            IList<string> localVariables = new List<string>();

            Token token = this.NextToken();

            if (token == null || token.Type != TokenType.Punctuation || token.Value != "|")
            {
                this.PushToken(token);
                return localVariables;
            }

            token = this.NextToken();

            while (token != null && token.Type == TokenType.Name)
            {
                localVariables.Add(token.Value);
                token = this.NextToken();
            }

            if (token == null || token.Type != TokenType.Punctuation || token.Value != "|")
                throw new ParserException("Expected '|'");

            return localVariables;
        }