update salaam and boot parfait codes too
This commit is contained in:
parent
10664ef090
commit
7c18ab3e36
@ -30,7 +30,7 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: git://github.com/salama/salama.git
|
||||
revision: 64d99d5e68f2ad512210ae64b33d6f1c1eddc1ec
|
||||
revision: b2de1c6d7911c16fa547d971ccbb106cf907cc2a
|
||||
specs:
|
||||
salama (0.3.0)
|
||||
salama-object-file (~> 0.3)
|
||||
|
@ -17,6 +17,8 @@ class DebugServer < Opal::Server
|
||||
route = path[1 .. path.index(".") - 1]
|
||||
if( route == "codes")
|
||||
[200, { 'Content-Type' => 'text/json' }, codes ]
|
||||
elsif( route == "parfait")
|
||||
[200, { 'Content-Type' => 'text/json' }, parfait ]
|
||||
else
|
||||
[200, { 'Content-Type' => 'text/json' }, code(route) ]
|
||||
end
|
||||
@ -24,6 +26,13 @@ class DebugServer < Opal::Server
|
||||
def codes
|
||||
[Dir["codes/*.soml"].collect{|f| f.sub("codes/","").sub(".soml","")}.join("----")]
|
||||
end
|
||||
def parfait
|
||||
all = []
|
||||
Soml::Compiler.each_parfait do |part|
|
||||
all << part
|
||||
end
|
||||
[all.inspect]
|
||||
end
|
||||
def code at
|
||||
soml = File.new("codes/#{at}.soml").read
|
||||
syntax = Parser::Salama.new.parse_with_debug(soml)
|
||||
|
Loading…
x
Reference in New Issue
Block a user