AjTalk.Model.ModelParser.ParseBlockLocalVariables C# (CSharp) Method

ParseBlockLocalVariables() private method

private ParseBlockLocalVariables ( ) : IList
return 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;
        }