Skip to content

Commit

Permalink
feat(objectionary#86): read descriptor from XMIR during compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jan 16, 2024
1 parent 476d63a commit be0ee3c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/main/java/org/eolang/opeo/compilation/OpeoNodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,20 @@ private static AstNode node(final XmlNode node) {
} else {
arguments = Collections.emptyList();
}
result = new Invocation(target, base.substring(1), arguments);
result = new Invocation(
target,
base.substring(1),
arguments,
node.attribute("scope")
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"Can't find descriptor for invocation of '%s'",
base
)
)
)
);
} else {
throw new IllegalArgumentException(
String.format("Can't recognize node: %n%s%n", node)
Expand Down

0 comments on commit be0ee3c

Please sign in to comment.