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

No support for namespace operator used in type declarations #3066

Commits on Sep 2, 2020

  1. Tokenizer: fix nullable type tokenization with namespace operator

    The `namespace` keyword as an operator is perfectly valid to be used as part of a type declaration.
    
    This usage was so far not supported in the tokenizer for the determination whether a `?` is a nullable type token or a ternary.
    
    Fixed now.
    jrfnl committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    1c59b29 View commit details
    Browse the repository at this point in the history
  2. Tokenizer: fix handling of namespace operator in types for arrow func…

    …tions
    
    The `namespace` keyword as an operator is perfectly valid to be used as part of a type declaration.
    
    This usage was so far not supported in the tokenizer for the arrow function backfill.
    
    Fixed now.
    jrfnl committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    db43214 View commit details
    Browse the repository at this point in the history
  3. File::get[Method|Member][Properties|Parameters](): add support for na…

    …mespace relative type declarations
    
    The `namespace` keyword as an operator is perfectly valid to be used as part of a type declaration.
    
    This usage was so far not supported in the `File::getMethodParameters()`, `File::getMethodProperties()` and the `File::getMemberProperties()` methods.
    
    Fixes now. Including adding a unit test for each.
    jrfnl committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    f2a5abf View commit details
    Browse the repository at this point in the history
  4. Tokenizer::recurseScopeMap(): fix scope setting for namespace operators

    The namespace keyword as a scope opener can never be within another scope, so we can safely ignore it when encountered as it will always be the namespace keyword used as an operator in that case.
    
    Includes dedicated unit tests.
    jrfnl committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    16d2cd1 View commit details
    Browse the repository at this point in the history