• Home
  • Raw
  • Download

Lines Matching refs:identifier

62 bool isValidInterfaceField(const std::string& identifier, std::string *errorMsg) {
90 if (std::find(reserved.begin(), reserved.end(), identifier) != reserved.end()) {
91 *errorMsg = identifier + " cannot be a name inside an interface";
97 bool isValidStructField(const std::string& identifier, std::string *errorMsg) {
103 if (std::find(reserved.begin(), reserved.end(), identifier) != reserved.end()) {
104 *errorMsg = identifier + " cannot be a name inside an struct or union";
110 bool isValidCompoundTypeField(CompoundType::Style style, const std::string& identifier,
116 return isValidStructField(identifier, errorMsg);;
119 bool isValidIdentifier(const std::string& identifier, std::string *errorMsg) {
154 if (std::find(keywords.begin(), keywords.end(), identifier) != keywords.end()) {
155 *errorMsg = identifier + " is a HIDL keyword "
156 "and is therefore not a valid identifier";
159 if (std::find(cppKeywords.begin(), cppKeywords.end(), identifier) != cppKeywords.end()) {
160 *errorMsg = identifier + " is a C++ keyword "
161 "and is therefore not a valid identifier";
164 if (std::find(javaKeywords.begin(), javaKeywords.end(), identifier) != javaKeywords.end()) {
165 *errorMsg = identifier + " is a Java keyword "
166 "and is therefore not a valid identifier";
169 if (std::find(cppCollide.begin(), cppCollide.end(), identifier) != cppCollide.end()) {
170 *errorMsg = identifier + " collides with reserved names in C++ code "
171 "and is therefore not a valid identifier";
174 if (StringHelper::StartsWith(identifier, "_hidl_")) {
175 *errorMsg = identifier + " starts with _hidl_ "
176 "and is therefore not a valid identifier";
179 if (StringHelper::StartsWith(identifier, "hidl_")) {
180 *errorMsg = identifier + " starts with hidl_ "
181 "and is therefore not a valid identifier";
184 if (StringHelper::EndsWith(identifier, "_cb")) {
185 *errorMsg = identifier + " ends with _cb "
186 "and is therefore not a valid identifier";
193 // Return true if identifier is an acceptable name for an UDT.
194 bool isValidTypeName(const std::string& identifier, std::string *errorMsg) {
195 if (!isValidIdentifier(identifier, errorMsg)) {
199 if (identifier == "toString") {
200 *errorMsg = identifier + " is not a valid type name";
235 %token<str> IDENTIFIER "identifier"
537 std::cerr << "ERROR: Malformed package identifier '"