Changeset 12695
- Timestamp:
- Apr 30, 2019 4:46:40 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/util/QualifiedName.java
r12694 r12695 48 48 isUnQualifiedImport = name.endsWith(".*"); 49 49 splitQualifiedClassName(name); 50 this.isGlobal = isGlobal; // Note: must be set terafter splitting50 this.isGlobal = isGlobal; // Note: must be set after splitting 51 51 iterator = names.iterator(); 52 52 } … … 114 114 ModelicaScanner ms = new ModelicaScanner(new StringReader(name)); 115 115 try { 116 Symbol sym = ms.nextToken(); 117 if (sym.getId() != Terminals.ID) 118 throw new NameFormatException("The qualified name is not valid"); 119 names.add((String)sym.value); 120 while ((sym = ms.nextToken()).getId() == Terminals.DOT) { 116 Symbol sym; 117 do { 121 118 sym = ms.nextToken(); 122 119 if (sym.getId() != Terminals.ID) 123 120 throw new NameFormatException("The qualified name is not valid"); 124 121 names.add((String)sym.value); 125 } 122 } while ((sym = ms.nextToken()).getId() == Terminals.DOT); 126 123 if (sym.getId() != Terminals.EOF) 127 124 throw new NameFormatException("Invalid name: " + name);
Note: See TracChangeset
for help on using the changeset viewer.