Skip to content

Equivalent of registry.loadGrammarFromPathSync API that doesn't touch the disk #21

Closed

Description

@vors

This issue is a feature request.
In our scenario (test harness), it's desirable to instantiate grammar from a text string and not a file on the disk. Could we add such API?

Activity

  1. alexdima commented on Sep 7, 2016

    @alexdima
    Member

    PR welcome. You can add an optional getFileContents?(filePath:string): string to the IGrammarLocator and then try that first before going to fs and pass some object encapsulating file reading to the two methods in grammarReader.ts.

  2. added
    feature-request
    and removed on Nov 15, 2017
  3. alexdima commented on Jul 12, 2019

    @alexdima
    Member

    This is now supported via the loadGrammar indirection.

  4. vors commented on Jul 13, 2019

    @vors
    Author

    Good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions