move to soml ending, new while example

This commit is contained in:
Torsten Ruger
2015-11-04 16:12:37 +02:00
parent 04c7ab7fee
commit 65e5f39420
7 changed files with 24 additions and 4 deletions

View File

@ -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