Skip to content

Commit

Permalink
fix(#3602): removed dot from XSD fqn
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Dec 4, 2024
1 parent c80994b commit 027c0fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion eo-parser/src/main/java/org/eolang/parser/XePhiListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ public void enterDispatch(final PhiParser.DispatchContext ctx) {

@Override
public void exitDispatch(final PhiParser.DispatchContext ctx) {
this.objects().prop("base", String.format(".%s", this.attributes.pop())).leave();
final String attr = this.attributes.pop();
if (!attr.isEmpty()) {
this.objects().prop("base", String.format(".%s", attr));
}
this.objects().leave();
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion eo-parser/src/main/resources/XMIR.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ SOFTWARE.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="∅|Q|QQ|[A-Z][a-zA-Z]+|\.|\.?(^|$|@|[a-z][^ \n\t\r]*)|[a-z][^ \n\t\r]*(\.[a-z][^ \n\t\r]*)*"/>
<xs:pattern value="∅|Q|QQ|[A-Z][a-zA-Z]+|\.?(^|$|@|[a-z][^ \n\t\r]*)|[a-z][^ \n\t\r]*(\.[a-z][^ \n\t\r]*)*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="locator">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void checksValidExpressions(final String phi) throws IOException {

@ParameterizedTest
@ClasspathSource(value = "org/eolang/parser/phi-typos/", glob = "**.phi")
void checksBrokenExressions(final String phi) throws IOException {
void checksBrokenExpressions(final String phi) throws IOException {
final XML xml = new StrictXML(new PhiSyntax(phi).parsed());
MatcherAssert.assertThat(
"syntax is broken, can't be parsed without errors",
Expand Down

0 comments on commit 027c0fa

Please sign in to comment.