-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
38 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
routes = server(5000); | ||
routes["/"] = { | ||
return "<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<h1>My First Heading</h1> | ||
<p>My first paragraph.</p> | ||
</body> | ||
</html>" | ||
final hello = { // code block that can be called or inlined elsewhere | ||
#spec author = "maniospas"; // any spec field can be set | ||
#spec version = "v1.0.0"; // can set field to objects too | ||
print("Hello "+name+"!"); | ||
} | ||
while(true) {} // wait indefinitely | ||
print(hello.version); | ||
name = read("What's your name?"); | ||
hello(name=name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
BUILTIN _bb0 I5000 | ||
server routes _bb0 | ||
BEGIN _bb2 | ||
BUILTIN _bb3 "<!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>" | ||
return _bbresult0 _bb3 | ||
BEGIN _bb0 | ||
BUILTIN _bb2 "!" | ||
BUILTIN _bb4 "Hello " | ||
add _bb3 _bb4 name | ||
add _bb1 _bb3 _bb2 | ||
print # _bb1 | ||
END | ||
BUILTIN _bb4 "/" | ||
put # routes _bb4 _bb2 | ||
BUILTIN _bb5 Btrue | ||
BEGIN _bb6 | ||
BUILTIN _bb5 Btrue | ||
IS hello _bb0 | ||
final # hello | ||
BUILTIN _bb5 "v1.0.0" | ||
setfinal # hello version _bb5 | ||
BUILTIN _bb6 "maniospas" | ||
setfinal # hello author _bb6 | ||
get _bb7 hello version | ||
print # _bb7 | ||
BUILTIN _bb8 "What's your name?" | ||
read name _bb8 | ||
BEGIN _bb11 | ||
IS name name | ||
END | ||
while # _bb5 _bb6 | ||
call _bb10 _bb11 hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters