graalvm / simplelanguage

A simple example language built using the Truffle API.
http://openjdk.java.net/projects/graal/
Universal Permissive License v1.0
614 stars 199 forks source link

Just replace 'function' to 'func'. testReplaceNodeReturnValue can't work? #102

Closed jiamo closed 4 years ago

jiamo commented 4 years ago

I try study this simple language. And replace 'function' to 'func' in g4 file. After change hardcode function to func Only one test can't pass:

Tests in error:
  testReplaceNodeReturnValue(com.oracle.truffle.sl.test.SLInstrumentTest): Undefined property: rp1

Is something hardcode in language/src/main which may cause this problem?

In case you want reproduce: https://github.com/jiamo/study_sl

jiamo commented 4 years ago

After understand SourceSection and change to SourceSection ss = DebuggerTester.getSourceImpl(source).createSection(20, 5); it works.