summaryrefslogtreecommitdiff
path: root/static/js/lang.js
diff options
context:
space:
mode:
authorLinus Lee <linus@thesephist.com>2020-09-24 07:53:59 -0400
committerLinus Lee <linus@thesephist.com>2020-09-24 07:53:59 -0400
commit6c67ca1a0450fac873ec13d0137824a20aef8ebe (patch)
tree1553d48f225c28475a8a39de7f9494323338077a /static/js/lang.js
parenta0163315d33cdaf902812782f20d92028440a1f1 (diff)
downloadtabloid-fake-closure-6c67ca1a0450fac873ec13d0137824a20aef8ebe.tar.gz
tabloid-fake-closure-6c67ca1a0450fac873ec13d0137824a20aef8ebe.zip
When hitting the tab key, actually indent in the editor. Also add boolean literal support
Diffstat (limited to 'static/js/lang.js')
-rw-r--r--static/js/lang.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/static/js/lang.js b/static/js/lang.js
index 5000e81..fe6f25b 100644
--- a/static/js/lang.js
+++ b/static/js/lang.js
@@ -534,12 +534,10 @@ class Environment {
const scope = this.scopes[this.scopes.length - 1];
switch (node.type) {
- case N.NumberLiteral: {
+ case N.NumberLiteral:
+ case N.StringLiteral:
+ case N.BoolLiteral:
return node.val;
- }
- case N.StringLiteral: {
- return node.val;
- }
case N.FnDecl: {
scope[node.name] = node;
return node;