-
Notifications
You must be signed in to change notification settings - Fork 957
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
Glimmer grammar updates #7064
Glimmer grammar updates #7064
Conversation
e868bc0
to
b03f025
Compare
Missing lockfile entries. |
Update tree-sitter-glimmer queries eh eh
2fc2352
to
7e08f91
Compare
Co-authored-by: Christian Clason <[email protected]>
Co-authored-by: Christian Clason <[email protected]>
Sorry for my ignorance: I am having trouble understanding glimmer and in what files it should apply, should something like the following be valid? import { useStore } from '@builder.io/mitosis';
export default function SpecialTags() {
const state = useStore({
get scriptStr(): string {
return `console.log('hello from script tag.')`;
},
styleStr: '.wrap { background-color: rgb(255, 0, 0); }',
});
return (
<div>
<template>
<div>Template Tag Div</div>
</template>
<style data-testid="wrap-style" innerHTML={state.styleStr} />
<div className="wrap">red content</div>
<script data-testid="special-script" innerHTML={state.scriptStr} />
</div>
);
} would this be a |
it would not, that is more JSX, and JSX is not allowed.
If the
For more information, ```gjs
code here
```
And the TS variant: ```glimmer-ts
// Linguist already bound gts to Gnome something, so we couldn't use the shorthand
```
Here is the community RFC where we explored several other grammars/syntaxes for having something with the benefits with both JSX and Static templates while also not having the downsides of those tools: emberjs/rfcs#779 |
Ah, that makes sense. Thanks for clarifying! |
This is stemming from an effort to move
<template>
support out of tree-sitter-javascript.See this discussion: tree-sitter/tree-sitter-typescript#308
These 3 grammars are related
<template>
parsing<template>
parsing<template>
tags parsed in the above grammarsI tested this locally with packer, via