Skip to content
Draft
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9ab8bbd
Merge @handlebars/parser into @glimmer/syntax
NullVoxPopuli Apr 9, 2026
25a8caa
Fix CI: restore partial/decorator handling, fix lint issues
NullVoxPopuli Apr 9, 2026
5964c83
Update .prettierignore for moved grammar files
NullVoxPopuli Apr 9, 2026
95b185f
Simplify inlined handlebars parser for Glimmer
NullVoxPopuli Apr 9, 2026
32bfd3c
Convert Exception to proper Error subclass
NullVoxPopuli Apr 9, 2026
baa4379
Replace Jison-generated parser with recursive-descent parser
NullVoxPopuli Apr 9, 2026
023af14
Fix rd-parser: don't break at {{ in parseProgram
NullVoxPopuli Apr 9, 2026
4e8ba9a
Update tests: accept parse-time errors for decorators/partial-blocks
NullVoxPopuli Apr 9, 2026
4c4a1b6
Fix rd-parser: escaped mustaches, strip+unescaped open
NullVoxPopuli Apr 9, 2026
13f5596
Fix rd-parser: hash pairs with spaces, numeric path segments
NullVoxPopuli Apr 9, 2026
5416c74
Fix rd-parser: backslash escape handling before {{
NullVoxPopuli Apr 9, 2026
e7c5468
Fix rd-parser: only allow digit-starting path segments after separators
NullVoxPopuli Apr 9, 2026
e3a62d2
Fix rd-parser: preserve raw source text in ContentStatement.original
NullVoxPopuli Apr 9, 2026
e7815f6
Fix rd-parser: split ContentStatements at escaped mustache boundaries
NullVoxPopuli Apr 9, 2026
94773f9
Fix rd-parser: stop escaped mustache content at any \+{{ boundary
NullVoxPopuli Apr 9, 2026
fc61c48
Fix rd-parser: match Jison error message format exactly
NullVoxPopuli Apr 9, 2026
6f50ea2
Fix rd-parser: match Jison backslash and error display behavior
NullVoxPopuli Apr 9, 2026
4e8957e
Fix rd-parser: match Jison token list and column for invalid chars
NullVoxPopuli Apr 9, 2026
33ec397
Fix rd-parser: don't treat whitespace as invalid token
NullVoxPopuli Apr 9, 2026
d3cf7f0
Fix rd-parser: don't catch . and [ as invalid tokens
NullVoxPopuli Apr 9, 2026
6a8cd44
Address review feedback
NullVoxPopuli Apr 9, 2026
6cb80f2
Replace recursive-descent parser with Chevrotain-based parser
NullVoxPopuli Apr 10, 2026
00f9627
Replace Chevrotain with Peggy-based parser
NullVoxPopuli Apr 10, 2026
57f3c46
Fix hbs-scanner: match Jison error messages for @ and invalid chars
NullVoxPopuli Apr 10, 2026
f51d1ef
Move path validation and partial rejection into grammar/scanner
NullVoxPopuli Apr 10, 2026
b4c7efb
Grammar produces head/tail directly on PathExpression
NullVoxPopuli Apr 10, 2026
5363114
SPIKE: Full HTML+Handlebars Peggy grammar producing ASTv1 directly
NullVoxPopuli Apr 10, 2026
394ea58
Wire Peggy grammar as default parser, delete old pipeline
NullVoxPopuli Apr 10, 2026
7e34f99
Fix CI: update lockfile, fix TypeScript errors
NullVoxPopuli Apr 10, 2026
6908c4d
Use pnpm instead of npx in rollup peggy plugin, add --allowed-start-r…
NullVoxPopuli Apr 10, 2026
d1e3ca0
Fix grammar: add missing 'original' property on PathHead nodes
NullVoxPopuli Apr 11, 2026
98d28df
Fix column off-by-one: Peggy uses 1-based columns, Glimmer uses 0-based
NullVoxPopuli Apr 11, 2026
8baab9b
Fix module resolution: workspace override + conditional exports
NullVoxPopuli Apr 11, 2026
aa88bb9
Revert workspace override and conditional exports
NullVoxPopuli Apr 11, 2026
b7a1927
Fix locals: set blockParams AFTER AST plugins run
NullVoxPopuli Apr 11, 2026
5e1c903
Fix Vite build crash in transform-each-track-array plugin
NullVoxPopuli Apr 11, 2026
9b9a4ab
Fix convertLocations: handle openTag/closeTag as SourceSpans
NullVoxPopuli Apr 11, 2026
eb0ba7b
Fix grammar: this.foo paths were losing their tail
NullVoxPopuli Apr 11, 2026
50901a8
Fix grammar: quoted attributes with single mustache must be ConcatSta…
NullVoxPopuli Apr 11, 2026
3239293
Fix Peggy grammar AST differences to match @glimmer/syntax output
NullVoxPopuli Apr 11, 2026
e4695f0
Fix AST shape: 12+ grammar fixes, strip flags, block whitespace
NullVoxPopuli Apr 11, 2026
7d2de88
Fix 49 test failures: error messages, locations, validation, whitespace
NullVoxPopuli Apr 11, 2026
4255c77
Fix 49 more test failures: error messages, locations, edge cases
NullVoxPopuli Apr 11, 2026
0917142
Fix last 5 test failures: error spans, inverse block locs, attr locs,…
NullVoxPopuli Apr 11, 2026
dec65e0
Fix 10 of 17 Prettier handlebars smoke test failures
NullVoxPopuli Apr 12, 2026
c8d2f34
Fix Prettier error test failures with explicit error rules in PEG gra…
NullVoxPopuli Apr 12, 2026
cce5cef
Fix type checking and Prettier error format
NullVoxPopuli Apr 12, 2026
507e27c
Fix error column off-by-one and eslint-disable placement
NullVoxPopuli Apr 12, 2026
03f855a
Add Chevrotain parser bakeoff backend
NullVoxPopuli Apr 14, 2026
4b69af0
Clean up PR: drop chevrotain backend, fix entity regression, centrali…
NullVoxPopuli Apr 14, 2026
83ccd8d
Address review: drop runtime simple-html-tokenizer, fix PathExpressio…
NullVoxPopuli Apr 14, 2026
46bc77d
CI fixes: update lockfile, ship .d.ts for html5-named-char-refs
NullVoxPopuli Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
run: pnpm build:types
- name: Check internal types
run: pnpm type-check:internals
- name: Check @handlebars/parser types
run: pnpm type-check:handlebars
- name: Check published types
run: pnpm type-check:types

Expand Down Expand Up @@ -222,7 +220,7 @@ jobs:
SHOULD_TRANSPILE_FOR_NODE: true
run: pnpm build
- name: test
run: pnpm test:node && pnpm --filter "@handlebars/parser" test
run: pnpm test:node

blueprint-test:
name: Blueprint Tests
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/glimmer-syntax-prettier-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
- "packages/@glimmer/interfaces/**"
- "packages/@glimmer/util/**"
- "packages/@glimmer/wire-format/**"
- "packages/@handlebars/parser/**"
pull_request:
paths:
- ".github/workflows/glimmer-syntax-prettier-smoke-test.yml"
Expand All @@ -27,7 +26,6 @@ on:
- "packages/@glimmer/interfaces/**"
- "packages/@glimmer/util/**"
- "packages/@glimmer/wire-format/**"
- "packages/@handlebars/parser/**"
workflow_dispatch:

permissions:
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ docs/
**/smoke-tests/
**/types/
**/type-tests/
packages/@handlebars/**/*.l
packages/@handlebars/**/*.yy
CHANGELOG.md
package.json
pnpm-lock.yaml
Expand Down
11 changes: 0 additions & 11 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export default [
'**/type-tests/',
'internal-docs/guides/**',
'packages/@glimmer-workspace/**',
'packages/@handlebars/parser/lib/parser.js',
'packages/@handlebars/parser/src/**',
'tracerbench-testing/',
],
},
Expand Down Expand Up @@ -189,15 +187,6 @@ export default [
'import/namespace': 'off',
},
},
{
files: ['packages/@handlebars/parser/spec/**/*.js'],

languageOptions: {
globals: {
...globals.mocha,
},
},
},
{
files: [
'packages/*/tests/**/*.[jt]s',
Expand Down
1 change: 0 additions & 1 deletion internal-docs/guides/development/build-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ The build system has specific rules for what gets inlined vs treated as external
- TypeScript helper library (`tslib`)

**Always External:**
- `@handlebars/parser`
- `simple-html-tokenizer`
- `babel-plugin-debug-macros`
- Other `@glimmer/*` packages (to avoid duplication)
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"test:browserstack": "node bin/run-browserstack-tests.js",
"test:wip": "vite build --mode development --minify false && testem ci",
"type-check:internals": "tsc --noEmit",
"type-check:handlebars": "tsc --noEmit --project packages/@handlebars/parser/tsconfig.json",
"type-check:types": "tsc --noEmit --project type-tests",
"type-check": "npm-run-all type-check:*"
},
Expand Down
18 changes: 18 additions & 0 deletions packages/@glimmer/syntax/lib/hbs-parser/exception.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default class Exception extends Error {
constructor(message, node) {
let loc = node && node.loc;

if (loc) {
message += ' - ' + loc.start.line + ':' + loc.start.column;
}

super(message);

if (loc) {
this.lineNumber = loc.start.line;
this.endLineNumber = loc.end.line;
this.column = loc.start.column;
this.endColumn = loc.end.column;
}
}
}
1 change: 1 addition & 0 deletions packages/@glimmer/syntax/lib/hbs-parser/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { parse, parseWithoutProcessing } from './parse.js';
18 changes: 18 additions & 0 deletions packages/@glimmer/syntax/lib/hbs-parser/parse.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { rdParse } from './rd-parser.js';
import WhitespaceControl from './whitespace-control.js';

export function parseWithoutProcessing(input, options) {
// Just return if an already-compiled AST was passed in.
if (input.type === 'Program') {
return input;
}

return rdParse(input, options);
}

export function parse(input, options) {
let ast = parseWithoutProcessing(input, options);
let strip = new WhitespaceControl(options);

return strip.accept(ast);
}
Loading
Loading