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

Fix importing language definition with dependencies #18

Merged
merged 3 commits into from
Jan 28, 2017

Conversation

Soreine
Copy link
Contributor

@Soreine Soreine commented Jan 25, 2017

Failed to load prism syntax: cpp
TypeError: Cannot set property 'keyword' of undefined

Currently, the plugin seems to fail with when the language syntax used has a dependency (its Prism definition extends another syntax), such as C++ that extends C, the plugin fails to load the syntax because it does not load its dependencies.

This PR requires at startup a "prelude" of syntax definitions, the few ones that are extended. It allows to use syntax such as cpp, java, go...

An alternative is to require dependencies dynamically. But this is not straight feasible, since Prism does not export the components dependencies list.

Related #16

@robmcguinness robmcguinness merged commit 61e4587 into gaearon:master Jan 28, 2017
@Soreine Soreine deleted the fix-language-extensions branch June 2, 2017 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants