fix all the cases, much white noise, array to list, string to sym stuff

This commit is contained in:
Torsten Ruger
2015-09-19 14:53:30 +03:00
parent 3b0b91f2fb
commit 21b652456d
78 changed files with 690 additions and 559 deletions

View File

@ -2,6 +2,8 @@ module Opers
abba = 5
end
-- -- --
s(:list, [s(:module, "Opers", [s(:assign,
s(:name, "abba"),
s(:int, 5))])])
s(:expressions,
s(:module, :Opers,
s(:assign,
s(:name, :abba),
s(:int, 5))))

View File

@ -4,8 +4,12 @@ module Foo
end
end
-- -- --
s(:list, [s(:module, "Foo", [s(:class, "Bar", nil, [s(:call,
s(:name, "funcall"),
s(:arguments,
s(:int, 3),
s(:name, "var")))])])])
s(:expressions,
s(:module, :Foo,
s(:class, :Bar,
s(:derives, nil),
s(:call,
s(:name, :funcall),
s(:arguments,
s(:int, 3),
s(:name, :var))))))

View File

@ -5,15 +5,18 @@ module Soho
end
end
-- -- --
s(:list, [s(:module, "Soho", [s(:call,
s(:name, "ofthen"),
s(:arguments,
s(:int, 3),
s(:name, "var"))), s(:function, :int,
s(:name, "ofthen"),
s(:parameters,
s(:field, :int, :n),
s(:field, :ref, :m)),
s(:expressions,
s(:return,
s(:int, 44))))])])
s(:expressions,
s(:module, :Soho,
s(:call,
s(:name, :ofthen),
s(:arguments,
s(:int, 3),
s(:name, :var))),
s(:function, :int,
s(:name, :ofthen),
s(:parameters,
s(:field, :int, :n),
s(:field, :ref, :m)),
s(:expressions,
s(:return,
s(:int, 44))))))

View File

@ -8,18 +8,20 @@ module Foo
end
end
-- -- --
s(:list, [s(:module, "Foo", [s(:function, :ref,
s(:name, "ofthen"),
s(:parameters,
s(:field, :int, :n)),
s(:expressions,
s(:if,
s(:condition,
s(:int, 0)),
s(:if_true,
s(:assign,
s(:name, "isit"),
s(:int, 42))),
s(:if_false, [s(:assign,
s(:name, "maybenot"),
s(:int, 667))]))))])])
s(:expressions,
s(:module, :Foo,
s(:function, :ref,
s(:name, :ofthen),
s(:parameters,
s(:field, :int, :n)),
s(:expressions,
s(:if,
s(:condition,
s(:int, 0)),
s(:if_true,
s(:assign,
s(:name, :isit),
s(:int, 42))),
s(:if_false, [s(:assign,
s(:name, :maybenot),
s(:int, 667))]))))))

View File

@ -5,16 +5,18 @@ module Opers
end
end
-- -- --
s(:list, [s(:module, "Opers", [s(:function, :int,
s(:name, "foo"),
s(:parameters,
s(:field, :int, :x)),
s(:expressions,
s(:name, "int"),
s(:assign,
s(:name, "abba"),
s(:int, 5)),
s(:return,
s(:operator, "+",
s(:name, "abba"),
s(:int, 5)))))])])
s(:expressions,
s(:module, :Opers,
s(:function, :int,
s(:name, :foo),
s(:parameters,
s(:field, :int, :x)),
s(:expressions,
s(:name, :int),
s(:assign,
s(:name, :abba),
s(:int, 5)),
s(:return,
s(:operator, "+",
s(:name, :abba),
s(:int, 5)))))))

View File

@ -2,4 +2,6 @@ module Simple
5
end
-- -- --
s(:list, [s(:module, "Simple", [s(:int, 5)])])
s(:expressions,
s(:module, :Simple,
s(:int, 5)))