-
Notifications
You must be signed in to change notification settings - Fork 36
Pratt parser #240
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
Open
dkryaklin
wants to merge
21
commits into
postcss:master
Choose a base branch
from
dkryaklin:v11/spec-first-playground
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pratt parser #240
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9335394
chore: v3 scaffolding (configs, tsconfigs, lint, quality gates)
dkryaklin 4784a49
feat(core): pratt tokenizer, parser, AST, type system
dkryaklin 3a604ca
feat(core): simplifier (per-function fold modules) + serializer
dkryaklin ad0e981
feat(plugin): PostCSS adapter + public entry + v10 regression patches
dkryaklin c0a664f
test: helpers, unit, property, and conformance test suites
dkryaklin a6b7e50
test: real-world calc() corpus (8 frameworks + GitHub harvest, 21k+ e…
dkryaklin e9ed841
chore: tooling scripts (benchmarks, randomizer, harvester, issue-chec…
dkryaklin 1e986b1
chore: address maintainer review (drop Node 20, consolidate tsconfigs…
dkryaklin 68eb0f0
fix(core): spec-compliant -{ident-start} tokenization + selectors fix
dkryaklin 333a7df
chore: address maintainer review feedback (round 2)
dkryaklin ce255f1
chore: drop internal version codenames from code/tests/docs
dkryaklin 21fb5d2
chore: tighten package boundary + clean rebuild
dkryaklin 69a11a0
chore: drop two dev scripts whose purpose ended with the rewrite
dkryaklin 8fe6f28
refactor(core): delegate tokenization to @csstools/css-tokenizer
dkryaklin b9d9572
refactor: drop the three legacy-compat options per maintainer review
dkryaklin 3142ae8
refactor: adopt cssnano source format — JS + JSDoc with strict checkJs
dkryaklin d8835ff
refactor: convert tests and scripts to plain JS, drop tsx
dkryaklin 792c1ca
chore: address maintainer review feedback (round 3)
dkryaklin ddd5b3b
fix(round): strategy-dependent result for infinite step
dkryaklin 4832f6b
chore: simplify package entry + test path construction
dkryaklin 0df485c
chore: address maintainer review feedback (round 4)
dkryaklin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| node_modules | ||
| .DS_Store | ||
| types/ | ||
| test/fixtures/*.actual.css | ||
| src/parser.js | ||
| yarn-error.log | ||
| reports/ | ||
| .stryker-tmp/ | ||
| test/corpus/github/files/ | ||
| test/corpus/github/.harvest-state.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,63 @@ | ||
| const js = require('@eslint/js'); | ||
| const eslintConfigPrettier = require('eslint-config-prettier'); | ||
| const sonarjs = require('eslint-plugin-sonarjs'); | ||
|
|
||
| module.exports = [ | ||
| { | ||
| ignores: ['src/parser.js'], | ||
| ignores: ['node_modules/**', '.stryker-tmp/**', 'reports/**', 'types/**'], | ||
| }, | ||
| js.configs.recommended, | ||
| // SonarJS — code smells, cognitive complexity, dead stores, etc. | ||
| { | ||
| files: ['src/**/*.js', 'test/**/*.mjs', 'scripts/**/*.mjs'], | ||
| plugins: { sonarjs }, | ||
| rules: { | ||
| ...sonarjs.configs.recommended.rules, | ||
| // Math hot paths (simplify, tokenizer, foldConstArgs, naive oracles) | ||
| // have intrinsic complexity that's not extractable without diluting | ||
| // single-pass intent. Default 15 is too tight; 25 still flags real | ||
| // accidental complexity. | ||
| 'sonarjs/cognitive-complexity': ['error', 25], | ||
| }, | ||
| }, | ||
| { | ||
| rules: { | ||
| // Underscore-prefix is the convention for "intentionally unused". | ||
| 'no-unused-vars': [ | ||
| 'error', | ||
| { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, | ||
| ], | ||
| }, | ||
| }, | ||
| eslintConfigPrettier, | ||
| { | ||
| files: ['src/**/*.js', 'test/**/*.js', 'eslint.config.js'], | ||
| languageOptions: { | ||
| sourceType: 'commonjs', | ||
| globals: { | ||
| process: 'readonly', | ||
| require: 'readonly', | ||
| module: 'readonly', | ||
| __dirname: 'readonly', | ||
| Buffer: 'readonly', | ||
| }, | ||
| }, | ||
| rules: { | ||
| curly: 'error', | ||
| }, | ||
| }, | ||
| { | ||
| files: ['**/*.mjs'], | ||
| languageOptions: { | ||
| sourceType: 'module', | ||
| globals: { | ||
| console: 'readonly', | ||
| performance: 'readonly', | ||
| process: 'readonly', | ||
| fetch: 'readonly', | ||
| URL: 'readonly', | ||
| setTimeout: 'readonly', | ||
| }, | ||
| }, | ||
| }, | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is the prepare script needed if we distribute precompiled JavaScript? Why would anyone to run
buildon install? https://docs.npmjs.com/cli/v11/using-npm/scripts#prepare-and-prepublishThere 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.
removed