Skip to content

Commit 9e5c002

Browse files
committed
Upgrade to JRuby 10.0.5.0 and Prism 0.0.2
MissingNode became ErrorRecoveryNode. Same handling for now.
1 parent b7e99ca commit 9e5c002

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

pom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,17 @@
7373
<dependency>
7474
<groupId>org.jruby</groupId>
7575
<artifactId>jruby-base</artifactId>
76-
<version>10.0.5.0-SNAPSHOT</version>
76+
<version>10.0.5.0</version>
7777
</dependency>
7878
<dependency>
7979
<groupId>org.ruby-lang</groupId>
80-
<artifactId>prism-parser</artifactId>
81-
<version>0.0.1</version>
80+
<artifactId>prism-parser-api</artifactId>
81+
<version>0.0.2-SNAPSHOT</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>org.ruby-lang</groupId>
85+
<artifactId>prism-parser-wasm</artifactId>
86+
<version>0.0.2-SNAPSHOT</version>
8287
</dependency>
8388
</dependencies>
8489

src/main/java/org/jruby/prism/builder/IRBuilderPrism.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ protected Operand build(Variable result, Node node) {
203203
case EmbeddedVariableNode n -> build(n.variable);
204204
// EmbeddedStatementsNode handle in interpolated processing
205205
// EnsureNode - covered by BeginNode and DefNode
206+
case ErrorRecoveryNode n -> buildErrorRecoveryNode(n);
206207
case FalseNode n -> fals();
207208
// MISSING: FindPatternNode
208209
case FloatNode n -> buildFloat(n);
@@ -249,7 +250,6 @@ protected Operand build(Variable result, Node node) {
249250
case MatchPredicateNode n -> buildMatchPredicate(n);
250251
case MatchRequiredNode n -> buildMatchRequired(n);
251252
case MatchWriteNode n -> buildMatchWrite(result, n);
252-
case MissingNode n -> buildMissing(n);
253253
case ModuleNode n -> buildModule(n);
254254
// MultiTargetNode handled a few places internally
255255
case MultiWriteNode n -> buildMultiWriteOrTargetNode(n.lefts, n.rest, n.rights, n.value);
@@ -933,6 +933,11 @@ private Operand buildElse(ElseNode node) {
933933
return buildStatements(node.statements);
934934
}
935935

936+
private Operand buildErrorRecoveryNode(ErrorRecoveryNode node) {
937+
System.out.println("uh oh");
938+
return nil();
939+
}
940+
936941
private Operand buildFlipFlop(FlipFlopNode node) {
937942
return buildFlip(node.left, node.right, node.isExcludeEnd());
938943
}
@@ -1558,11 +1563,6 @@ private Operand buildMatchWrite(Variable result, MatchWriteNode node) {
15581563
return result;
15591564
}
15601565

1561-
private Operand buildMissing(MissingNode node) {
1562-
System.out.println("uh oh");
1563-
return nil();
1564-
}
1565-
15661566
private Operand buildModule(ModuleNode node) {
15671567
return buildModule(determineBaseName(node.constant_path), node.constant_path, node.body,
15681568
createStaticScopeFrom(node.locals, StaticScope.Type.LOCAL),

0 commit comments

Comments
 (0)