Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Wiki
  • design

design · Changes

Page history
Apply ASI for yield as well authored May 02, 2017 by Ingvar Stepanyan's avatar Ingvar Stepanyan
Hide whitespace changes
Inline Side-by-side
design.md
View page @ b08d8a18
...@@ -64,7 +64,7 @@ disambiguate. Algorithm: ...@@ -64,7 +64,7 @@ disambiguate. Algorithm:
// ... + {...} // ... + {...}
// ... typeof {...} // ... typeof {...}
return false return false
else if tok-1 is "return" else if tok-1 is one of "return" "yield"
// handle ASI // handle ASI
if lineNumber(tok) isnt lineNumber(tok-1) if lineNumber(tok) isnt lineNumber(tok-1)
// return // return
...@@ -73,8 +73,6 @@ disambiguate. Algorithm: ...@@ -73,8 +73,6 @@ disambiguate. Algorithm:
else else
// return {...} // return {...}
return false return false
else if tok-1 is "yield" // could also put "yield" in unaryOps
return false
else if tok-1 is one of "debugger" "break" "continue" "throw" else if tok-1 is one of "debugger" "break" "continue" "throw"
parse error parse error
else if tok-1 is one of "void" "typeof" "in" "case" "delete" else if tok-1 is one of "void" "typeof" "in" "case" "delete"
......
Clone repository
  • Example macros
  • FAQ
  • High level design overview
  • Home
  • Macro resources
  • Patterns
  • Syntax Case
  • case api
  • custom operators
  • design
  • expander design
  • modules
  • node loader
  • pattern_class
  • reader scratch
View All Pages