update salaam and boot parfait codes too
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user