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

Add a lexer for Ada 2012. #1255

Merged
merged 2 commits into from
Jul 11, 2019
Merged

Add a lexer for Ada 2012. #1255

merged 2 commits into from
Jul 11, 2019

Commits on Jul 10, 2019

  1. Add lexer for Ada 2012.

    This implements Ada as described in the [Consolidated Ada 2012 Language
    Reference Manual](http://ada-auth.org/standards/ada12_w_tc1.html).
    
    Follow the pygments example in terms of mime-type and file extensions
    detected, but allow for full Unicode identifiers. Ada has specific rules
    about the use of underscores in identifiers and number literals, and we
    flag any errors.
    
    Resolves #824.
    stoklund committed Jul 10, 2019
    Configuration menu
    Copy the full SHA
    2f15dfd View commit details
    Browse the repository at this point in the history
  2. Update Ada lexer after review by @pyrmont.

    The rule entering state :libunit_name was incorrectly classifying
    whitespace as Keyword::Namespace in `limited with`. Add a spec to make
    sure this is marked as Text.
    
    In the :libunit_name state, detect keywords that shouldn't be there and
    use those to recover quickly from the incorrectly entered state.
    
    This recovery is more robust that the previous ping-pong with
    :libunit_sep, so merge that state into libunit_name for simplicity.
    
    Add specs to make sure we're recovering well.
    stoklund committed Jul 10, 2019
    Configuration menu
    Copy the full SHA
    3a7d5bc View commit details
    Browse the repository at this point in the history