X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=runtime%2Fsyntax%2Fjavascript.yaml;h=dfce427265362724b6df6b679032ebacd79b02ff;hb=ca9b1d7b145daf185d7c128f1244aeec9d552805;hp=84f9d2754b78419d420140187d02ac798d038d59;hpb=e26417fd1475af444f92e9e8451e6682e7419c1f;p=micro.git diff --git a/runtime/syntax/javascript.yaml b/runtime/syntax/javascript.yaml index 84f9d275..dfce4272 100644 --- a/runtime/syntax/javascript.yaml +++ b/runtime/syntax/javascript.yaml @@ -1,7 +1,7 @@ filetype: javascript detect: - filename: "(\\.js$|\\.es[5678]?$)" + filename: "(\\.js$|\\.es[5678]?$|\\.mjs$)" header: "^#!.*/(env +)?node( |$)" rules: @@ -17,7 +17,7 @@ rules: - symbol.brackets: "(\\[|\\])" - symbol.operator: "[-+/*=<>!~%?:&|]" - statement: "\\b(async|await|break|case|catch|const|continue|debugger|default|delete|do|else|export|finally)\\b" - - statement: "\\b(for|function|class|extends|get|if|import|in|instanceof|let|new|return|set)\\b" + - statement: "\\b(for|function|class|extends|get|if|import|from|in|of|instanceof|let|new|return|set)\\b" - statement: "\\b(super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b" # reserved but unassigned - error: "\\b(enum|implements|interface|package|private|protected|public)"