liveview-native / live_view_native_stylesheet

MIT License
10 stars 4 forks source link

Include original source in the annotation #33

Closed NduatiK closed 9 months ago

NduatiK commented 9 months ago

Resolves #31

bcardarella commented 9 months ago

I think this should be in the Rules parser and not the sheet parser. What we're looking for is the actual styling rule source. For example, if you have the following class:

"big-red" do
  color(.red)
  size(.big)
end

these aren't actual SwiftUI modifiers, just to make the example. We'd want the AST annotation for each rule to include just the original source of that single rule. I don't believe there is much value is annotating the class matcher itself.

NduatiK commented 9 months ago

Closing in favor of https://github.com/liveview-native/liveview-client-swiftui/pull/1191