Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the janky GML parser with a good one #58

Closed
35 tasks done
adam-coster opened this issue May 2, 2023 · 0 comments
Closed
35 tasks done

Replace the janky GML parser with a good one #58

adam-coster opened this issue May 2, 2023 · 0 comments
Assignees
Labels
✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode

Comments

@adam-coster
Copy link
Member

adam-coster commented May 2, 2023

The current GML parser used by the VSCode extension can only handle globals. It isn't smart enough to fully parse a project, and can't do any advanced things like scope analysis.

For full Intellisense support we really need scope analysis, so we also need a new parser.

The MVP needs to include at least the functionality we currently have.

MVP Features

  • Generate concrete syntax tree from GML
  • Track all project global declarations
    • macros
    • enums
    • globalvars
    • script-functions
    • assets
  • Track all project global references
    • macros
    • enums
    • globalvars
    • script-functions
    • built-ins
    • asset IDs
  • Global function signatures
  • 🆕 Track all localvar declarations
  • 🆕 Track all localvar references
  • 🆕 Track all enum member references
  • Watch files for changes (e.g. for catching external changes)
  • Force a virtual file-change (e.g. for current, unsaved edits)
  • 🆕 Fault-tolerant parsing
  • Re-parse a single file on change
  • List all symbol locations and types in a given file (for semantic highlighting)
    • 🆕 vars
    • built-in functions
    • built-in constants
    • 🆕 enum members
  • For a given file and position, list all in-scope (for autocomplete)
    • 🆕 vars
    • globals
    • 🆕 enum members
    • built-ins
  • For a given file and position, get the symbol at that position if there is one (for hovers etc)
  • 🆕 Create diagnostics based on parser errors
  • 🆕 Create diagnostics based on unknown variables
@adam-coster adam-coster added ✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode labels May 2, 2023
@adam-coster adam-coster self-assigned this May 2, 2023
@adam-coster adam-coster added this to the GML Parser Upgrade milestone May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode
Projects
None yet
Development

No branches or pull requests

1 participant