-
Notifications
You must be signed in to change notification settings - Fork 25
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 parsing + prettier support for @param in {% doc %} tags #646
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4d4c72d
to
92a1d96
Compare
64f7dd8
to
944ecb4
Compare
92a1d96
to
10ded69
Compare
330b509
to
59c43dc
Compare
10ded69
to
79f4c94
Compare
@@ -402,7 +402,8 @@ function findCurrentNode( | |||
case NodeTypes.TextNode: | |||
case NodeTypes.LiquidLiteral: | |||
case NodeTypes.String: | |||
case NodeTypes.Number: { | |||
case NodeTypes.Number: | |||
case NodeTypes.LiquidDocParamNode: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exists to appease CI for the moment - I foresee us revisiting this once we are implementing completions
@@ -1103,7 +1109,7 @@ export function cstToAst( | |||
} | |||
|
|||
function buildAst( | |||
cst: LiquidHtmlCST | LiquidCST | ConcreteAttributeNode[], | |||
cst: LiquidHtmlCST | LiquidCST | LiquidDocCST | ConcreteAttributeNode[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I just be adding this to LiquidHtmlCST
? My plan is to allow LiquidDocCST
to evolve over time. I wanted to keep them separate as much as possible since LiquidDoc
is kind of its own thing
cc: @charlespwd
1a1108a
to
68227c4
Compare
Implement fallbackNode for LiquidDoc Enhance Liquid HTML Parser: Introduce paramNode and update CST tests - Added `paramNode` to the grammar for LiquidDoc, allowing for parameter definitions in doc tags. - Updated the parsing logic to recognize and handle `@param` syntax correctly. - Modified CST tests to validate the new structure, ensuring proper identification of `LiquidDocParamNode` and associated text nodes. - Refactored existing tests to align with the new parsing rules and improve accuracy. Introduce LiquidDocCST and LiquidDocConcrete Add liquidDocParam handling to stage2 AST - Updated the `toLiquidDocAST` function to include handling for `@param` syntax and fallback text node Prettier - Add CSS Handling Enhance LiquidCompletionParams: Add handling for LiquidDocParamNode in LiquidCompletionParams Add LiquidCST to union of LiquidHTMLCST types Add LiquidDocParamNode case to print function Add basic prettier support for doc tag
68227c4
to
e7ed99d
Compare
What are you adding in this PR?
What's next? Any followup issues?
What did you learn?
Before you deploy
changeset
allChecks
array insrc/checks/index.ts
yarn build
and committed the updated configuration filestheme-app-extension.yml
configchangeset
changeset