Skip to content

Commit

Permalink
partial fix for issue #40 : #40
Browse files Browse the repository at this point in the history
- array-access-support added (e.g. args[3] )
  • Loading branch information
miho committed Nov 24, 2014
1 parent ea2649f commit 60d7188
Show file tree
Hide file tree
Showing 2 changed files with 167 additions and 0 deletions.
2 changes: 2 additions & 0 deletions VRL/VRL-UI/NB-Sample/src/main/groovy/Main.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ public class Main {
Main main;
main = (new Main());
main.m1(32);

println(args)
}
public int m1(int p1) {
println("Calling m1(): " + 48);
Expand Down
165 changes: 165 additions & 0 deletions VRL/VRL-UI/NB-Sample/src/main/groovy/MainArrays.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
public class MainArrays {


public static void main(String[] args) {
String s;
s = (args[0]);
println(s);
}
}
// <editor-fold defaultstate="collapsed" desc="VRL-Data">
/*<!VRL!><Type:VRL-Layout>
<map>
<entry>
<string>Script</string>
<layout>
<x>0.0</x>
<y>0.0</y>
<width>576.2533569335938</width>
<height>443.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:op ACCESS_ARRAY_ELEMENT</string>
<layout>
<x>248.8755317662245</x>
<y>211.20303081799412</y>
<width>365.50875226229124</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:op ASSIGN:0</string>
<layout>
<x>747.9309233618131</x>
<y>247.91748683798082</y>
<width>324.98484005369664</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:declare args</string>
<layout>
<x>0.0</x>
<y>0.0</y>
<width>229.88190908398693</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:println:0</string>
<layout>
<x>1194.414669888256</x>
<y>134.36854328075532</y>
<width>215.55118711319096</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:0</string>
<layout>
<x>0.0</x>
<y>163.8108096467495</y>
<width>339.0699764061807</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:declare s:0</string>
<layout>
<x>325.41814543218226</x>
<y>1.6131666212084046</y>
<width>200.0</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:inv:declare this</string>
<layout>
<x>0.963592997922056</x>
<y>0.0</y>
<width>200.0</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:declare args:0</string>
<layout>
<x>0.0</x>
<y>0.0</y>
<width>229.88190908398693</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:println</string>
<layout>
<x>1194.414669888256</x>
<y>134.36854328075532</y>
<width>215.55118711319096</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:op ACCESS_ARRAY_ELEMENT:0</string>
<layout>
<x>248.8755317662245</x>
<y>211.20303081799412</y>
<width>365.50875226229124</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:declare s</string>
<layout>
<x>325.41814543218226</x>
<y>1.6131666212084046</y>
<width>200.0</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main:inv:op ASSIGN</string>
<layout>
<x>747.9309233618131</x>
<y>247.91748683798082</y>
<width>324.98484005369664</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays:main</string>
<layout>
<x>0.0</x>
<y>163.8108096467495</y>
<width>339.0699764061807</width>
<height>150.0</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
<entry>
<string>Script:MainArrays</string>
<layout>
<x>0.0</x>
<y>0.0</y>
<width>695.0372601585583</width>
<height>549.533163855855</height>
<contentVisible>true</contentVisible>
</layout>
</entry>
</map>
*/
// </editor-fold>

0 comments on commit 60d7188

Please sign in to comment.