wheredevel / beanshell2

Automatically exported from code.google.com/p/beanshell2
0 stars 0 forks source link

Enhancement request for the bsh.Parser #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
--
I want to do something like a pre compiler and replace special taged strings. 
Lets say comething like: 

  b = 12;
  a = `precompiler_action(`another precomiler_action(b)`)`;
  c = a*2;
  d = `another precomiler_action(c)`;

More details in this thread: 
http://beanshell.2283338.n4.nabble.com/How-could-I-split-a-script-into-its-singl
e-statements-tp3901030p3901030.html

What is the expected output? What do you see instead?
--
I would need a parsed tree so that I could do something like this:
  for (Statement s : bsh.Parser.Statements(wholeScriptCode)) {
    s.setStatementString(doPrecompileAction(s.getStatementString()));
    s.eval();
  }

What version of the product are you using? On what operating system?
--
2.1b4

Please provide any additional information below.

Original issue reported on code.google.com by vorarlbe...@gmail.com on 23 Oct 2011 at 5:43

GoogleCodeExporter commented 9 years ago
This appears to be a duplicate of issue #37.

Original comment by bogusan...@gmail.com on 11 Dec 2012 at 9:19