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

Split PHP grammar into separate HTML and PHP portions #217

Merged
merged 13 commits into from Oct 25, 2017

Conversation

Projects
None yet
2 participants
@50Wliu
Member

50Wliu commented Jun 12, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

This PR splits the PHP grammar into two distinct files: html.cson, responsible for detecting PHP tags, and php.cson, responsible for the actual PHP grammar. This separation allows other packages to include just the PHP grammar, something that wasn't possible beforehand.

Alternate Designs

No alternatives were considered.

Benefits

Packages such as language-gfm and code-peek will be able to tokenize PHP even if the code is not wrapped with <?php ?> tags. First line matches will actually be useful.

Possible Drawbacks

I don't foresee any.

Applicable Issues

Fixes #182

@50Wliu 50Wliu added the needs-review label Jun 12, 2017

@50Wliu

This comment has been minimized.

Show comment
Hide comment
@50Wliu

50Wliu Jul 13, 2017

Member

I attempted to merge with master in a1fbacf, however given the scope of the changes many of them were applied incorrectly (such as comma matching being added to interpolation instead of the top-level patterns...). Hopefully I've sorted out all the inconsistencies.

Member

50Wliu commented Jul 13, 2017

I attempted to merge with master in a1fbacf, however given the scope of the changes many of them were applied incorrectly (such as comma matching being added to interpolation instead of the top-level patterns...). Hopefully I've sorted out all the inconsistencies.

@50Wliu 50Wliu referenced this pull request Oct 16, 2017

Closed

Cannot include php into another grammar package #287

1 of 1 task complete

50Wliu and others added some commits Jun 12, 2017

Test source.php in php-spec, text.html.php in html-spec
Move firstLineMatch back to php.cson
Merge pull request #292 from Ingramz/wl-split-grammars-extra
Additional changes for the split grammars

@50Wliu 50Wliu merged commit 0854ed1 into master Oct 25, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@50Wliu 50Wliu deleted the wl-split-grammars branch Oct 25, 2017

@50Wliu 50Wliu referenced this pull request Jan 29, 2018

Closed

php not recognized #308

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