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

Prepare Jetpack parser for outputing stylesheet as a map #473

Closed
wants to merge 1 commit into from

Conversation

NduatiK
Copy link
Contributor

@NduatiK NduatiK commented Sep 28, 2024

  • Remove variable related code since we are using EEx
  • Always return a list of modifiers (instead of the inner tuple for singletons)
  • Return annotations as a map instead of keyword list

- Remove variable related code since we are using EEx
- Always return a list of modifiers (instead of the inner tuple for singletons)
- Return annotations as a map instead of keyword list
@NduatiK NduatiK marked this pull request as draft September 28, 2024 15:51
@NduatiK
Copy link
Contributor Author

NduatiK commented Sep 28, 2024

@NduatiK NduatiK changed the title Prepare ast for conversion to JSON Prepare Jetpack parser for outputing stylesheet as a map Sep 28, 2024
@@ -18,7 +18,7 @@ defmodule LiveViewNative.Jetpack.RulesParserTest do
{line, input} = {__ENV__.line, "\nbold(true)"}

# We add 1 because the modifier is on the second line of the input
output = {:bold, [file: __ENV__.file, line: line + 1, module: __ENV__.module, source: "bold(true)"], [true]}
output = [[:bold, %{file: __ENV__.file, line: line + 1, module: __ENV__.module, source: "bold(true)"}, [true]]]
Copy link
Contributor

Choose a reason for hiding this comment

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

the annotations should still be a keyword list, not a map

@bcardarella
Copy link
Contributor

I think this PR is now invalidated by liveview-native/live_view_native_stylesheet#89. It will handle the proper encoding of the AST. The internal representation does't need to change.

@NduatiK close?

@NduatiK NduatiK closed this Nov 21, 2024
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.

2 participants