move to soml ending, new while example
This commit is contained in:
parent
04c7ab7fee
commit
65e5f39420
10
README.md
10
README.md
@ -93,7 +93,7 @@ The Register view is now greatly improved, especially in it's dynamic features:
|
||||
|
||||
The last feature of inspecting objects is show in the screenshot. This makes it possible
|
||||
to very quickly verify the programs behaviour. As it is a pure object system , all data is in
|
||||
objects, and all objects can be inspected.
|
||||
objects, and all objects can be inspected.
|
||||
|
||||
### Debugging the debugger
|
||||
|
||||
@ -107,3 +107,11 @@ usable and restarting a debug is fine.
|
||||
## Todos
|
||||
|
||||
Breakpoints would be nice at some point. Both in step count and variable value.
|
||||
|
||||
## Trying it out
|
||||
|
||||
Clone
|
||||
|
||||
Bundle
|
||||
|
||||
bundle exec rackup
|
||||
|
12
codes/a_while.soml
Normal file
12
codes/a_while.soml
Normal file
@ -0,0 +1,12 @@
|
||||
class Object
|
||||
|
||||
int main()
|
||||
int i = 5
|
||||
while_plus(i)
|
||||
"out".putstring()
|
||||
i = i - 1
|
||||
end
|
||||
return i
|
||||
end
|
||||
|
||||
end
|
@ -22,11 +22,11 @@ class DebugServer < Opal::Server
|
||||
end
|
||||
end
|
||||
def codes
|
||||
[Dir["codes/*.saml"].collect{|f| f.sub("codes/","").sub(".saml","")}.join("----")]
|
||||
[Dir["codes/*.soml"].collect{|f| f.sub("codes/","").sub(".soml","")}.join("----")]
|
||||
end
|
||||
def code at
|
||||
saml = File.new("codes/#{at}.saml").read
|
||||
syntax = Parser::Salama.new.parse_with_debug(saml)
|
||||
soml = File.new("codes/#{at}.soml").read
|
||||
syntax = Parser::Salama.new.parse_with_debug(soml)
|
||||
parts = Parser::Transform.new.apply(syntax)
|
||||
[parts.inspect]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user