From 342fd2e8d671ce81588b599ec8f33eb50ba9665c Mon Sep 17 00:00:00 2001 From: Linus Lee Date: Thu, 24 Sep 2020 08:22:22 -0400 Subject: Clean up some keywords + mobile view --- static/js/main.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'static/js/main.js') diff --git a/static/js/main.js b/static/js/main.js index debad58..fe242d8 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,7 +1,7 @@ const PROG_FACTORIAL = `YOU WON'T WANT TO MISS 'Hello, World!' DISCOVER HOW TO factorial WITH n -WE SAID +RUMOR HAS IT WHAT IF n IS ACTUALLY 0 SHOCKING DEVELOPMENT 1 LIES! @@ -16,10 +16,10 @@ YOU WON'T WANT TO MISS result PLEASE LIKE AND SUBSCRIBE`; const PROG_FIBONACCI = `DISCOVER HOW TO fibonacci WITH a, b, n -WE SAID +RUMOR HAS IT WHAT IF n SMALLER THAN 1 SHOCKING DEVELOPMENT b - LIES! WE SAID + LIES! RUMOR HAS IT YOU WON'T WANT TO MISS b SHOCKING DEVELOPMENT fibonacci OF b, a PLUS b, n MINUS 1 @@ -109,11 +109,11 @@ class Editor extends Component { return jdom`
+ onclick=${this.setFibonacci}>Fibonacci sample + onclick=${this.setFactorial}>Factorial sample + onclick=${this.handleRun}>Run this!
@@ -231,10 +231,10 @@ class App extends Component { target="_blank">Ink.

How much is there?

-

Here's the full list of non-standard keywords that Tabloid currently uses:

+

Here's the full list of standard keywords that Tabloid currently uses:

  • DISCOVER HOW TO...WITH declare a function
  • -
  • WE SAID begin a block scope
  • +
  • RUMOR HAS IT begin a block scope
  • A OF B, C call function A with arguments B, C
  • WHAT IF...LIES! an if-else expression
  • END OF STORY end a block scope
  • @@ -243,6 +243,7 @@ class App extends Component {
  • TOTALLY RIGHT true
  • COMPLETELY WRONG false
  • PLUS / MINUS / TIMES / DIVIDED BY / MODULO the obvious arithmetic operations
  • +
  • BEATS / SMALLER THAN greater than / less than
  • IS ACTUALLY is equal to
  • BEATS / SMALLER THAN greater than / less than
  • SHOCKING DEVELOPMENT return from a function
  • -- cgit v1.2.3-70-g09d2