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
  • Merge requests
  • !518

Add MacroContext::read

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/bopjesvla/master into master Mar 28, 2016
  • Overview 7
  • Commits 6
  • Pipelines 0
  • Changes 7

Created by: bopjesvla

Takes a syntax type or grammar production, a value and an error callback. All arguments are optional, although the type is necessary to check the value. Returns the next syntax object.

Passes a SyntaxError to the callback if the type or value doesn't match, a TypeError if the syntax type doesn't exist, and a ReferenceError* if the end of the context is reached. If no callback is given, errors are thrown.

* a SyntaxError might make more sense, but this keeps error handling simple


This could also be implemented as an extension of the "next" method.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/bopjesvla/master