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

scoped-block-params-autocomplete #29

Merged
merged 5 commits into from
Dec 5, 2019

Conversation

lifeart
Copy link
Owner

@lifeart lifeart commented Dec 5, 2019

this pr allow us:

  • get node source code (for Handlebars)
  • check PathExpression for scoped definition (via blocks)
  • capture focus on block param definition
  • get block param declaration node (from PathExpression)

new public API for focusPath:

type BlockParam = {
        type: 'BlockParam';
        name: string;
        path: ASTPath;
        index: number
};

{
  sourceForNode: () => string | undefined,
  sourceForParent: () => string | undefined,
  metaForType(string: 'handlebars') {
    return {
      maybeBlockParamDefinition: undefined | BlockParam,
      maybeBlockParamDeclarationBlockPath: undefined | ASTPath,
      localScope: BlockParam[]
    }
  }
}

#12

@codecov
Copy link

codecov bot commented Dec 5, 2019

Codecov Report

Merging #29 into component-context-info-origin will increase coverage by 2.86%.
The diff coverage is 71.54%.

Impacted file tree graph

@@                        Coverage Diff                        @@
##           component-context-info-origin      #29      +/-   ##
=================================================================
+ Coverage                          35.01%   37.87%   +2.86%     
=================================================================
  Files                                 17       17              
  Lines                               1191     1299     +108     
  Branches                             274      294      +20     
=================================================================
+ Hits                                 417      492      +75     
- Misses                               774      807      +33
Impacted Files Coverage Δ
...uiltin-addons/core/template-completion-provider.ts 17.55% <15.38%> (+0.05%) ⬆️
src/utils/ast-helpers.ts 10.78% <50%> (+0.38%) ⬆️
src/glimmer-utils.ts 81.32% <78.7%> (-7.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3abb22...8f67a22. Read the comment docs.

@lifeart lifeart merged commit 51cd4c0 into component-context-info-origin Dec 5, 2019
@lifeart lifeart deleted the scoped-params-autocomplete branch December 22, 2019 19:41
@lifeart lifeart mentioned this pull request May 23, 2020
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

1 participant