Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *Main> main
- Source code:
- do {
- nest1 = {
- do {
- do {
- throw "FAIL";
- }
- }
- };
- do nest1;
- }
- AST:
- .BinaryOp "CALL" .Variable "do" .LBlock (CodeBlock .LNull [] [.BinaryOp "=" .Variable "nest1" .LBlock (CodeBlock .LNull [] [.BinaryOp "CALL" .Variable "do" .LBlock (CodeBlock .LNull [] [.BinaryOp "CALL" .Variable "do" .LBlock (CodeBlock .LNull [] [.BinaryOp "CALL" .Variable "throw" .LString "FAIL"])])]),.BinaryOp "CALL" .Variable "do" .Variable "nest1"])
- Bytecode:
- .Push #block:
- .Push #block:
- .Push #block:
- .Push #block:
- .Push #block:
- .Push #block:
- .Push #block:
- .Push #block:
- .Push #"FAIL"
- .GetScope
- .Push #"throw"
- .GetCascading
- .Call
- .Do
- .GetScope
- .Push #"do"
- .GetCascading
- .Call
- .Do
- .GetScope
- .Push #"do"
- .GetCascading
- .Call
- .Do
- .GetScope
- .Push #"nest1"
- .AssignCascading
- .GetScope
- .Push #"nest1"
- .GetCascading
- .GetScope
- .Push #"do"
- .GetCascading
- .Call
- .Do
- .GetScope
- .Push #"do"
- .GetCascading
- .Call
- Output:
- Exception occurred at .{<code>: 1, 4}.
- "FAIL"
- in source "<code>":
- do {
- ^
- in source "<code>":
- }
- };
- do nest1;
- ^
- in source "<code>":
- do {
- nest1 = {
- ^
- in source "<code>":
- do {
- nest1 = {
- do {
- ^
- in source "<code>":
- nest1 = {
- do {
- do {
- ^
- in source "<code>":
- do {
- do {
- throw "FAIL";
- ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement