Lines Matching refs:l
94 static const char* eatIdent(const char* l, const char* end) { in eatIdent() argument
95 if (!(l < end && isIdentStart(*l++))) return nullptr; in eatIdent()
96 while (l < end && isIdentBody(*l)) l++; in eatIdent()
97 return l; in eatIdent()
101 static const char* eatPackage(const char* l, const char* end) { in eatPackage() argument
102 if ((l = eatIdent(l, end)) == nullptr) return nullptr; in eatPackage()
104 while (l < end && *l == '.') { in eatPackage()
105 l++; in eatPackage()
106 if ((l = eatIdent(l, end)) == nullptr) return nullptr; in eatPackage()
108 return l; in eatPackage()
112 static const char* eatNumber(const char* l, const char* end) { in eatNumber() argument
113 if (!(l < end)) return nullptr; in eatNumber()
114 if (*l == '0') return l + 1; in eatNumber()
115 if (!isLeadingDigit(*l++)) return nullptr; in eatNumber()
116 while (l < end && isDigit(*l)) l++; in eatNumber()
117 return l; in eatNumber()
125 const char* l = s.c_str(); in setTo() local
126 const char* end = l + s.size(); in setTo()
144 if (l < end && isIdentStart(*l)) { in setTo()
145 package.start = l; in setTo()
146 if ((package.end = l = eatPackage(l, end)) == nullptr) return false; in setTo()
148 if (l < end && *l == '@') { in setTo()
149 l++; in setTo()
151 major.start = l; in setTo()
152 if ((major.end = l = eatNumber(l, end)) == nullptr) return false; in setTo()
154 if (!(l < end && *l++ == '.')) return false; in setTo()
156 minor.start = l; in setTo()
157 if ((minor.end = l = eatNumber(l, end)) == nullptr) return false; in setTo()
159 if (l < end && *l == ':') { in setTo()
160 l++; in setTo()
161 if (l < end && *l == ':') { in setTo()
162 l++; in setTo()
163 name.start = l; in setTo()
164 if ((name.end = l = eatPackage(l, end)) == nullptr) return false; in setTo()
165 if (l < end && *l++ == ':') { in setTo()
166 type.start = l; in setTo()
167 if ((type.end = l = eatIdent(l, end)) == nullptr) return false; in setTo()
170 type.start = l; in setTo()
171 if ((type.end = l = eatIdent(l, end)) == nullptr) return false; in setTo()
175 if (l < end) return false; in setTo()