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

parser cleanup #2177

Merged
merged 4 commits into from Jun 2, 2019
Merged

parser cleanup #2177

merged 4 commits into from Jun 2, 2019

Conversation

jerch
Copy link
Member

@jerch jerch commented Jun 2, 2019

The parser has accumulated needed changes over time. Part of #1823.

Things to do:

  • remove Array fallback for the transition table
    This is not needed anymore since all supported engines have typed array support.
  • simplify transition table creation
    With the transition table being a typed array the table can be prefilled with the default transition by a .fill call.
  • dont recreate arrays in r() everytime, instead slice from a blueprint
  • simplify unicode handling in parse
    Use the new NON_ASCII_PRINTABLE where appropriate and restore the error state as error state.

@jerch jerch added the work-in-progress Do not merge label Jun 2, 2019
@jerch jerch self-assigned this Jun 2, 2019
@jerch jerch changed the title remove transition table Array fallback, cleanup tests parser cleanup Jun 2, 2019
@jerch jerch mentioned this pull request Jun 2, 2019
11 tasks
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after adding some constants if it makes sense to

src/core/parser/EscapeSequenceParser.ts Outdated Show resolved Hide resolved
src/core/parser/EscapeSequenceParser.ts Outdated Show resolved Hide resolved
@Tyriar Tyriar added this to the 4.0.0 milestone Jun 2, 2019
@Tyriar Tyriar removed the work-in-progress Do not merge label Jun 2, 2019
@jerch jerch merged commit d5fddae into xtermjs:master Jun 2, 2019
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.

None yet

2 participants