Note that there are some explanatory texts on larger screens.

plurals
  1. POXText: 7 languages tutorial can't resolve reference to JvmIdentifiableElement in example 1 scripting
    primarykey
    data
    text
    <p>I'm following 7 languages tutoiral from XText homepage (<a href="http://www.eclipse.org/Xtext/7languages.html" rel="nofollow">http://www.eclipse.org/Xtext/7languages.html</a>)</p> <p>In the first example "scripting" I've managed to get almost everything running, but there seems to be a problem with identifiers scoping.</p> <p>I have editor running and code generation for empty script, but trying to write anything useful doesn't work.</p> <p>I typed code for grammar and model inferer verbatim from tutorial and also tried to use versions from github repo with examples <a href="https://github.com/xtext-dev/seven-languages-xtext" rel="nofollow">https://github.com/xtext-dev/seven-languages-xtext</a></p> <p><strong>demo.script</strong></p> <pre><code>val i = 1 </code></pre> <p><strong>demo.java</strong> generated</p> <pre><code>public class demo { public static void main(final String[] args) { final int i = 1; } } </code></pre> <p>This works fine</p> <p>Now here is input that causes problems</p> <p><strong>error.script</strong></p> <pre><code>println("test") </code></pre> <p>This reports two errors:</p> <p><em>Error 1</em></p> <pre><code>Description: Couldn't resolve reference to JvmIdentifiableElement 'println'. Resource: error.script Path: /org.xtext.scripting.demo/scripting Location: line: 3 /org.xtext.scripting.demo/scripting/demo.script Type: Scripting Problem </code></pre> <p><em>Error 2</em></p> <pre><code>Description: This expression is not allowed in this context, since it doesn't cause any side effects. Resource: error.script Path: /org.xtext.scripting.demo/scripting Location: line: 1 /org.xtext.scripting.demo/scripting/error.script Type: Scripting Problem </code></pre> <p>I'm using XText plugins in version 2.4.0</p> <p>Any suggestions what to change to make this example working as described in tutorial?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload