예제 #1
0
 protected bool Equals(MatchNameRule other)
 {
     return(string.Equals(Name, other.Name) && Equals(Type, other.Type) && IsArraySubsequence == other.IsArraySubsequence);
 }
예제 #2
0
파일: LensParser.cs 프로젝트: menozz/lens
        /// <summary>
        /// rule_name                                   = identifier [ ":" type ]
        /// </summary>
        private MatchNameRule parseRuleName()
        {
            if (!peek(LexemType.Identifier))
                return null;

            var node = new MatchNameRule { Name = getValue() };
            if (check(LexemType.Colon))
                node.Type = ensure(parseType, ParserMessages.TypeSignatureExpected);

            return node;
        }