snippet (look at last line)

  // overrides nabl2/runtime/analysis/main.str/nabl2--analyze(pre)
  nabl2--analyze(pre):
    AnalyzeUnit(source,ast,initial) -> UnitResult(ast',[Constraint(C)])
    where not(<nabl2--is-empty-ast> ast)
    with nabl2--analysis-step(!$[Preprocessing AST [source]],
      params := <getfirst(?Params(<id>))> initial;
      ast' := <pre;nabl2--index-ast(|source)> ast
    )
    with nabl2--analysis-step(!$[Generating constraints [source]],
      C := <nabl2--generate-constraint-file(|source,params);nabl2--normalize-constraint> ast'
    )
    with nabl2--analysis-step(!$[Storing AST [source]],
      rules(StoredAst : source -> ast)
      ; <collect-all(is-string);map(debug;try(nabl2--get-ast-index);debug)>ast
    )

outputs

15:05 | INFO  | stderr                         - >>> Storing AST eclipse:///debug/debug.ice2
15:05 | INFO  | stderr                         - debug
15:05 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",2)
15:05 | INFO  | stderr                         - j
15:05 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",20)
15:05 | INFO  | stderr                         - r2
15:05 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",37)
15:05 | INFO  | stderr                         - foo
15:05 | INFO  | stderr                         - foo
15:05 | INFO  | stderr                         - Foo
15:05 | INFO  | stderr                         - Foo
15:05 | INFO  | stderr                         - 4
15:05 | INFO  | stderr                         - 4
15:05 | INFO  | stderr                         - r
15:05 | INFO  | stderr                         - r
15:05 | INFO  | stderr                         - foo2
15:05 | INFO  | stderr                         - foo2
15:05 | INFO  | stderr                         - i
15:05 | INFO  | stderr                         - i
15:05 | INFO  | stderr                         - 5
15:05 | INFO  | stderr                         - 5
15:05 | INFO  | stderr                         - <<< Storing AST eclipse:///debug/debug.ice2 (finished in 0,00s)

while calling a builder

  debug-get-ast-value:
    (selected, position, ast, path, project-path) -> None()
    with
      <store-analysis>path
    with
      <debug>"debug-get-ast-value"
    with
      modulename := <collect-one(is-modulename)>ast;
      <debug>modulename
    with
      <collect-all(is-string);map(debug;try(nabl2--get-ast-index);debug)>ast

outputs

15:08 | INFO  | stderr                         - debug-get-ast-value
15:08 | INFO  | stderr                         - debug
15:08 | INFO  | stderr                         - debug
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",2)
15:08 | INFO  | stderr                         - j
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",20)
15:08 | INFO  | stderr                         - r2
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",37)
15:08 | INFO  | stderr                         - foo
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",42)
15:08 | INFO  | stderr                         - Foo
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",44)
15:08 | INFO  | stderr                         - 4
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",54)
15:08 | INFO  | stderr                         - r
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",56)
15:08 | INFO  | stderr                         - foo2
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",60)
15:08 | INFO  | stderr                         - i
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",64)
15:08 | INFO  | stderr                         - 5
15:08 | INFO  | stderr                         - TermIndex("eclipse:///debug/debug.ice2",69)
Eclipse: org.eclipse.platform.ide 4.6.0.I20160606-1100
Spoofax: org.metaborg.spoofax.eclipse 2.1.0.20160921-104818-master
System: Windows 10 amd64 10.0
Submitted by Daco Harkes on 21 September 2016 at 15:09

On 21 September 2016 at 15:11 Daco Harkes commented:

specific commit illustrating issue https://github.com/MetaBorgCube/IceDust/tree/5874b01d235b31fb0ebff8adf2035b08020edb2c


On 17 October 2016 at 21:04 Hendrik van Antwerpen commented:

I think this is fixed now.


On 17 October 2016 at 21:04 Hendrik van Antwerpen closed this issue.

On 18 October 2016 at 00:52 Daco Harkes commented:

Indeed, I haven't seen this issue anymore with the new custom-analysis-hook.

Log in to post comments