Tag

Syntactic

0 views collected around this technical thread.

ByteFE
ByteFE
Apr 22, 2021 · Frontend Development

Understanding ECMAScript Grammars: Lexical and Syntactic Rules and the Disallowance of await as an Identifier

This article explains how the ECMAScript specification defines four context‑free grammars—lexical, syntactic, RegExp, and numeric string—illustrates ambiguities such as the '/' token and template literals, and shows how static semantics forbid using the await keyword as an identifier inside async functions while allowing it elsewhere.

ECMAScriptGrammarLexical
0 likes · 15 min read
Understanding ECMAScript Grammars: Lexical and Syntactic Rules and the Disallowance of await as an Identifier