diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35e2d53..0efd580 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,4 +154,4 @@ jobs: working-directory: tool run: npm ci && npm run generate - name: Check for differences - run: git diff --exit-code -- packages/syntax/lib packages/syntax/NOTICE + run: git diff --exit-code -- packages/syntax_core/lib packages/syntax_core/NOTICE diff --git a/README.md b/README.md index 2d925cf..1bc52fe 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,12 @@ theme. | Package | What it is | |---|---| -| [`packages/syntax`](packages/syntax) | Pure Dart, zero dependencies. Contains the tokenizer, themes, HTML/ANSI rendering, diff tools (patch parsing, line diffs, word-level changes), and the renderer-neutral pieces other renderers build on. It runs on the VM, AOT, the web and inside Flutter. | +| [`packages/syntax_core`](packages/syntax_core) | Pure Dart, zero dependencies. Contains the tokenizer, themes, HTML/ANSI rendering, diff tools (patch parsing, line diffs, word-level changes), and the renderer-neutral pieces other renderers build on. It runs on the VM, AOT, the web and inside Flutter. | | [`packages/syntax_flutter`](packages/syntax_flutter) | Contains `HighlightedCode` (read-only highlighted code), `PatchView` (a highlighted diff or patch, unified or split) and `HighlighterScope`. | | [`packages/syntax_flutter/example`](packages/syntax_flutter/example) | A read-only code, diff and patch preview with a picker for every bundled language and theme. | | [`packages/syntax_noir`](packages/syntax_noir) | Terminal widgets on [noir](https://github.com/btwld/noir): a `CodeHighlighter` for noir's `CodeView` and a `PatchView`. Needs Dart 3.10, so it sits outside the workspace. | -Install [`syntax`](https://pub.dev/packages/syntax), +Install [`syntax_core`](https://pub.dev/packages/syntax_core), [`syntax_flutter`](https://pub.dev/packages/syntax_flutter), and [`syntax_noir`](https://pub.dev/packages/syntax_noir) from pub.dev (0.0.1). Renderers paint what the core lays out. @@ -64,7 +64,7 @@ grammar.json ──► RuleFactory ──► Grammar.tokenizeLine(line, state) Shiki, with its Oniguruma WASM engine, is the oracle. -- **Bundled grammars:** `packages/syntax/test/conformance_test.dart` checks +- **Bundled grammars:** `packages/syntax_core/test/conformance_test.dart` checks 18 bundled grammars on 21 samples. Every token's scopes match Shiki exactly, as does every character's color and font style under three themes: 84 of 84 checks pass. @@ -111,11 +111,11 @@ default, as in VS Code; set `Highlighter.maxLineLength` to change it. Reproduce with the same input for each: ```bash -dart run packages/syntax/benchmark/tokenize.dart path/to/file.dart +dart run packages/syntax_core/benchmark/tokenize.dart path/to/file.dart ``` ```bash -dart compile js -O4 packages/syntax/benchmark/web_bench.dart -o /tmp/syntax_bench.js && node /tmp/syntax_bench.js path/to/file.dart +dart compile js -O4 packages/syntax_core/benchmark/web_bench.dart -o /tmp/syntax_bench.js && node /tmp/syntax_bench.js path/to/file.dart ``` ```bash @@ -125,7 +125,7 @@ cd tool && npm run bench -- path/to/file.dart The long-line numbers come from: ```bash -dart run packages/syntax/benchmark/long_line.dart +dart run packages/syntax_core/benchmark/long_line.dart ``` ## Development @@ -138,7 +138,7 @@ The workspace is `syntax` and `syntax_flutter`, so it resolves with the Flutter SDK. ```bash -cd packages/syntax && dart test +cd packages/syntax_core && dart test ``` ```bash @@ -168,11 +168,11 @@ cd tool && npm ci && npm run generate && npm run samples && npm run golden These tools are for checking regex and tokenizer changes against every Shiki grammar: -- `packages/syntax/tool/coverage.dart` translates and compiles every +- `packages/syntax_core/tool/coverage.dart` translates and compiles every pattern in a directory of grammars. -- `packages/syntax/tool/stress.dart`, with `tool/stress.mjs`, compares +- `packages/syntax_core/tool/stress.dart`, with `tool/stress.mjs`, compares tokens with Shiki for every grammar that has an upstream sample. -- `packages/syntax/tool/git_compare.dart` checks `parsePatch` and +- `packages/syntax_core/tool/git_compare.dart` checks `parsePatch` and `diffTexts` against `git diff` on random edits. ## Not done yet @@ -185,4 +185,4 @@ Shiki grammar: ## License BSD 3-Clause, see [LICENSE](LICENSE). The bundled grammars and themes keep -their own licenses, listed in [packages/syntax/NOTICE](packages/syntax/NOTICE). +their own licenses, listed in [packages/syntax_core/NOTICE](packages/syntax_core/NOTICE). diff --git a/packages/syntax/CHANGELOG.md b/packages/syntax/CHANGELOG.md deleted file mode 100644 index d43c725..0000000 --- a/packages/syntax/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.1 - -See https://github.com/btwld/syntax-dart/releases/tag/syntax-v0.0.1 diff --git a/packages/syntax/.pubignore b/packages/syntax_core/.pubignore similarity index 100% rename from packages/syntax/.pubignore rename to packages/syntax_core/.pubignore diff --git a/packages/syntax_core/CHANGELOG.md b/packages/syntax_core/CHANGELOG.md new file mode 100644 index 0000000..2968ae8 --- /dev/null +++ b/packages/syntax_core/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +See https://github.com/btwld/syntax-dart/releases/tag/syntax_core-v0.0.1 diff --git a/packages/syntax/LICENSE b/packages/syntax_core/LICENSE similarity index 100% rename from packages/syntax/LICENSE rename to packages/syntax_core/LICENSE diff --git a/packages/syntax/NOTICE b/packages/syntax_core/NOTICE similarity index 100% rename from packages/syntax/NOTICE rename to packages/syntax_core/NOTICE diff --git a/packages/syntax/README.md b/packages/syntax_core/README.md similarity index 92% rename from packages/syntax/README.md rename to packages/syntax_core/README.md index 1bef449..636988f 100644 --- a/packages/syntax/README.md +++ b/packages/syntax_core/README.md @@ -8,9 +8,9 @@ web and Flutter. ## Usage ```dart -import 'package:syntax/syntax.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/themes/github_dark.dart'; final highlighter = Highlighter(languages: [dartLanguage]); @@ -56,18 +56,18 @@ in one call. Each grammar and theme is its own library, so unused ones are tree-shaken: -- `package:syntax/langs/.dart`. The bundled languages are: +- `package:syntax_core/langs/.dart`. The bundled languages are: - css, dart, diff, go, html, javascript, json, jsonc, kotlin, markdown, python, rust, shellscript, sql, swift, typescript, xml and yaml. - Markdown highlights fenced code blocks for any of these languages that you register. -- `package:syntax/themes/.dart`. The bundled themes are: +- `package:syntax_core/themes/.dart`. The bundled themes are: - github-dark and github-light; - dark-plus and light-plus; - one-dark-pro, dracula, nord, monokai and tokyo-night; - catppuccin (latte and mocha) and vitesse (dark and light); - min-light and solarized-light. -- `package:syntax/langs/all.dart` and `package:syntax/themes/all.dart` contain +- `package:syntax_core/langs/all.dart` and `package:syntax_core/themes/all.dart` contain everything. ### Your own grammars and themes @@ -136,7 +136,7 @@ Renderers keep their own interaction state and wording; for example, Names such as `Token`, `Language` and `Grammar` are common. If they clash with your own, import with a prefix: -`import 'package:syntax/syntax.dart' as syntax;`. +`import 'package:syntax_core/syntax.dart' as syntax;`. ## Regex engine diff --git a/packages/syntax/analysis_options.yaml b/packages/syntax_core/analysis_options.yaml similarity index 100% rename from packages/syntax/analysis_options.yaml rename to packages/syntax_core/analysis_options.yaml diff --git a/packages/syntax/benchmark/long_line.dart b/packages/syntax_core/benchmark/long_line.dart similarity index 93% rename from packages/syntax/benchmark/long_line.dart rename to packages/syntax_core/benchmark/long_line.dart index 4cdcabf..1761895 100644 --- a/packages/syntax/benchmark/long_line.dart +++ b/packages/syntax_core/benchmark/long_line.dart @@ -2,9 +2,9 @@ // Each line repeats a snippet a whole number of times, so every length // ends the same way: some JavaScript patterns look ahead to the line end. // dart run benchmark/long_line.dart [lengths...] -import 'package:syntax/langs/javascript.dart'; -import 'package:syntax/langs/json.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/langs/javascript.dart'; +import 'package:syntax_core/langs/json.dart'; +import 'package:syntax_core/syntax.dart'; // Minified JavaScript: functions, arrows, classes, template and regex // literals, object literals and numbers. diff --git a/packages/syntax/benchmark/tokenize.dart b/packages/syntax_core/benchmark/tokenize.dart similarity index 87% rename from packages/syntax/benchmark/tokenize.dart rename to packages/syntax_core/benchmark/tokenize.dart index 1e701b5..d14cee8 100644 --- a/packages/syntax/benchmark/tokenize.dart +++ b/packages/syntax_core/benchmark/tokenize.dart @@ -3,9 +3,9 @@ // dart compile exe benchmark/tokenize.dart -o /tmp/bench && /tmp/bench import 'dart:io'; -import 'package:syntax/syntax.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/themes/github_dark.dart'; void main(List args) { final code = File(args.single).readAsStringSync(); diff --git a/packages/syntax/benchmark/web_bench.dart b/packages/syntax_core/benchmark/web_bench.dart similarity index 90% rename from packages/syntax/benchmark/web_bench.dart rename to packages/syntax_core/benchmark/web_bench.dart index 1a4637c..76886a8 100644 --- a/packages/syntax/benchmark/web_bench.dart +++ b/packages/syntax_core/benchmark/web_bench.dart @@ -4,9 +4,9 @@ // node /tmp/syntax_bench.js path/to/file.dart import 'dart:js_interop'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart'; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/themes/github_dark.dart'; @JS('process.argv') external JSArray get _argv; diff --git a/packages/syntax/example/main.dart b/packages/syntax_core/example/main.dart similarity index 85% rename from packages/syntax/example/main.dart rename to packages/syntax_core/example/main.dart index 0d4b4d2..28b55be 100644 --- a/packages/syntax/example/main.dart +++ b/packages/syntax_core/example/main.dart @@ -1,6 +1,6 @@ -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart'; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/themes/github_dark.dart'; const code = ''' void main() { diff --git a/packages/syntax/lib/langs/all.dart b/packages/syntax_core/lib/langs/all.dart similarity index 96% rename from packages/syntax/lib/langs/all.dart rename to packages/syntax_core/lib/langs/all.dart index 7eb23af..dc3efe6 100644 --- a/packages/syntax/lib/langs/all.dart +++ b/packages/syntax_core/lib/langs/all.dart @@ -2,7 +2,7 @@ // // Importing this library pulls in every bundled entry. Import // individual files instead to keep app size down. -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; import 'css.dart'; import 'dart.dart'; diff --git a/packages/syntax/lib/langs/css.dart b/packages/syntax_core/lib/langs/css.dart similarity index 99% rename from packages/syntax/lib/langs/css.dart rename to packages/syntax_core/lib/langs/css.dart index 48ea202..de16723 100644 --- a/packages/syntax/lib/langs/css.dart +++ b/packages/syntax_core/lib/langs/css.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/af600487b1e94374d9f48f57cbf2cad24656b07f/extensions/css/syntaxes/css.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// CSS (`source.css`). const cssLanguage = Language( diff --git a/packages/syntax/lib/langs/dart.dart b/packages/syntax_core/lib/langs/dart.dart similarity index 99% rename from packages/syntax/lib/langs/dart.dart rename to packages/syntax_core/lib/langs/dart.dart index 2f2c8d3..dd9d903 100644 --- a/packages/syntax/lib/langs/dart.dart +++ b/packages/syntax_core/lib/langs/dart.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/af600487b1e94374d9f48f57cbf2cad24656b07f/extensions/dart/syntaxes/dart.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Dart (`source.dart`). const dartLanguage = Language( diff --git a/packages/syntax/lib/langs/diff.dart b/packages/syntax_core/lib/langs/diff.dart similarity index 98% rename from packages/syntax/lib/langs/diff.dart rename to packages/syntax_core/lib/langs/diff.dart index 41d3f9b..2e6920b 100644 --- a/packages/syntax/lib/langs/diff.dart +++ b/packages/syntax_core/lib/langs/diff.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/4549bd26c7b799284e0ebd8dc1e0310e6a8707a1/extensions/diff/syntaxes/diff.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Diff (`source.diff`). const diffLanguage = Language( diff --git a/packages/syntax/lib/langs/go.dart b/packages/syntax_core/lib/langs/go.dart similarity index 99% rename from packages/syntax/lib/langs/go.dart rename to packages/syntax_core/lib/langs/go.dart index d56c118..f566f3c 100644 --- a/packages/syntax/lib/langs/go.dart +++ b/packages/syntax_core/lib/langs/go.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/091ef378baaa141c8bc4bbe9775d4cb3bd655a80/extensions/go/syntaxes/go.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Go (`source.go`). const goLanguage = Language( diff --git a/packages/syntax/lib/langs/html.dart b/packages/syntax_core/lib/langs/html.dart similarity index 99% rename from packages/syntax/lib/langs/html.dart rename to packages/syntax_core/lib/langs/html.dart index 48aef5c..c182a84 100644 --- a/packages/syntax/lib/langs/html.dart +++ b/packages/syntax_core/lib/langs/html.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/45324363153075dab0482312ae24d8c068d81e4f/extensions/html/syntaxes/html.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// HTML (`text.html.basic`). const htmlLanguage = Language( diff --git a/packages/syntax/lib/langs/javascript.dart b/packages/syntax_core/lib/langs/javascript.dart similarity index 99% rename from packages/syntax/lib/langs/javascript.dart rename to packages/syntax_core/lib/langs/javascript.dart index 0276130..11253d1 100644 --- a/packages/syntax/lib/langs/javascript.dart +++ b/packages/syntax_core/lib/langs/javascript.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/210541906e5a96ab39f9c753f921b1bd35f4138b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// JavaScript (`source.js`). const javascriptLanguage = Language( diff --git a/packages/syntax/lib/langs/json.dart b/packages/syntax_core/lib/langs/json.dart similarity index 98% rename from packages/syntax/lib/langs/json.dart rename to packages/syntax_core/lib/langs/json.dart index bdc6374..c20c3e9 100644 --- a/packages/syntax/lib/langs/json.dart +++ b/packages/syntax_core/lib/langs/json.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/d6af4893ed9a3545163a4cb748fa5548bd1e51a5/extensions/json/syntaxes/JSON.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// JSON (`source.json`). const jsonLanguage = Language( diff --git a/packages/syntax/lib/langs/jsonc.dart b/packages/syntax_core/lib/langs/jsonc.dart similarity index 98% rename from packages/syntax/lib/langs/jsonc.dart rename to packages/syntax_core/lib/langs/jsonc.dart index ade7be2..f21a864 100644 --- a/packages/syntax/lib/langs/jsonc.dart +++ b/packages/syntax_core/lib/langs/jsonc.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/0adddd82816db666c52038e8277312dc55da2756/extensions/json/syntaxes/JSONC.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// JSON with Comments (`source.json.comments`). const jsoncLanguage = Language( diff --git a/packages/syntax/lib/langs/kotlin.dart b/packages/syntax_core/lib/langs/kotlin.dart similarity index 99% rename from packages/syntax/lib/langs/kotlin.dart rename to packages/syntax_core/lib/langs/kotlin.dart index b15a7d9..5b785a5 100644 --- a/packages/syntax/lib/langs/kotlin.dart +++ b/packages/syntax_core/lib/langs/kotlin.dart @@ -2,7 +2,7 @@ // Source: https://github.com/fwcd/vscode-kotlin/blob/626e20d5c51a4379c4c0ee293aa89e58b5232aec/syntaxes/kotlin.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Kotlin (`source.kotlin`). const kotlinLanguage = Language( diff --git a/packages/syntax/lib/langs/markdown.dart b/packages/syntax_core/lib/langs/markdown.dart similarity index 99% rename from packages/syntax/lib/langs/markdown.dart rename to packages/syntax_core/lib/langs/markdown.dart index 8e93d07..d90d908 100644 --- a/packages/syntax/lib/langs/markdown.dart +++ b/packages/syntax_core/lib/langs/markdown.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/6d8ab9737d58fc5eaf07e2ae6553b38183a5de47/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Markdown (`text.html.markdown`). const markdownLanguage = Language( diff --git a/packages/syntax/lib/langs/python.dart b/packages/syntax_core/lib/langs/python.dart similarity index 99% rename from packages/syntax/lib/langs/python.dart rename to packages/syntax_core/lib/langs/python.dart index 9db433e..b3159d4 100644 --- a/packages/syntax/lib/langs/python.dart +++ b/packages/syntax_core/lib/langs/python.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/cf4c9e469d521fa5f33353737e8157eb0789ad02/extensions/python/syntaxes/MagicPython.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Python (`source.python`). const pythonLanguage = Language( diff --git a/packages/syntax/lib/langs/rust.dart b/packages/syntax_core/lib/langs/rust.dart similarity index 99% rename from packages/syntax/lib/langs/rust.dart rename to packages/syntax_core/lib/langs/rust.dart index 1b15736..32718e8 100644 --- a/packages/syntax/lib/langs/rust.dart +++ b/packages/syntax_core/lib/langs/rust.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/af600487b1e94374d9f48f57cbf2cad24656b07f/extensions/rust/syntaxes/rust.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Rust (`source.rust`). const rustLanguage = Language( diff --git a/packages/syntax/lib/langs/shellscript.dart b/packages/syntax_core/lib/langs/shellscript.dart similarity index 99% rename from packages/syntax/lib/langs/shellscript.dart rename to packages/syntax_core/lib/langs/shellscript.dart index ad9c1b2..193aa76 100644 --- a/packages/syntax/lib/langs/shellscript.dart +++ b/packages/syntax_core/lib/langs/shellscript.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/9473445f7d3dcb5c579f42ece8b6c18c43c63ed3/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Shell (`source.shell`). const shellscriptLanguage = Language( diff --git a/packages/syntax/lib/langs/sql.dart b/packages/syntax_core/lib/langs/sql.dart similarity index 99% rename from packages/syntax/lib/langs/sql.dart rename to packages/syntax_core/lib/langs/sql.dart index 3d5e1e6..3569f20 100644 --- a/packages/syntax/lib/langs/sql.dart +++ b/packages/syntax_core/lib/langs/sql.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/af600487b1e94374d9f48f57cbf2cad24656b07f/extensions/sql/syntaxes/sql.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// SQL (`source.sql`). const sqlLanguage = Language( diff --git a/packages/syntax/lib/langs/swift.dart b/packages/syntax_core/lib/langs/swift.dart similarity index 99% rename from packages/syntax/lib/langs/swift.dart rename to packages/syntax_core/lib/langs/swift.dart index 45c077c..983efb7 100644 --- a/packages/syntax/lib/langs/swift.dart +++ b/packages/syntax_core/lib/langs/swift.dart @@ -2,7 +2,7 @@ // Source: https://github.com/jtbandes/swift-tmlanguage/blob/2be007b6bc88e54a0edfd3c313ff31276edc923d/Swift.tmLanguage.yaml // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// Swift (`source.swift`). const swiftLanguage = Language( diff --git a/packages/syntax/lib/langs/typescript.dart b/packages/syntax_core/lib/langs/typescript.dart similarity index 99% rename from packages/syntax/lib/langs/typescript.dart rename to packages/syntax_core/lib/langs/typescript.dart index 8f94a21..30e0047 100644 --- a/packages/syntax/lib/langs/typescript.dart +++ b/packages/syntax_core/lib/langs/typescript.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/210541906e5a96ab39f9c753f921b1bd35f4138b/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// TypeScript (`source.ts`). const typescriptLanguage = Language( diff --git a/packages/syntax/lib/langs/xml.dart b/packages/syntax_core/lib/langs/xml.dart similarity index 99% rename from packages/syntax/lib/langs/xml.dart rename to packages/syntax_core/lib/langs/xml.dart index 924dae2..f358934 100644 --- a/packages/syntax/lib/langs/xml.dart +++ b/packages/syntax_core/lib/langs/xml.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/10a1d2a50a2882f5ae85bdb51eb04d3064fb9de9/extensions/xml/syntaxes/xml.tmLanguage.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// XML (`text.xml`). const xmlLanguage = Language( diff --git a/packages/syntax/lib/langs/yaml.dart b/packages/syntax_core/lib/langs/yaml.dart similarity index 99% rename from packages/syntax/lib/langs/yaml.dart rename to packages/syntax_core/lib/langs/yaml.dart index 3a67522..2b29394 100644 --- a/packages/syntax/lib/langs/yaml.dart +++ b/packages/syntax_core/lib/langs/yaml.dart @@ -1,7 +1,7 @@ // GENERATED by tool/generate.mjs. Do not edit. // Source: https://github.com/textmate/yaml.tmbundle/blob/e54ceae3b719506dba7e481a77cea4a8b576ae46/Syntaxes/YAML.tmLanguage // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show Language; +import 'package:syntax_core/syntax.dart' show Language; /// YAML (`source.yaml`). const yamlLanguage = Language( diff --git a/packages/syntax/lib/src/diff/compact.dart b/packages/syntax_core/lib/src/diff/compact.dart similarity index 100% rename from packages/syntax/lib/src/diff/compact.dart rename to packages/syntax_core/lib/src/diff/compact.dart diff --git a/packages/syntax/lib/src/diff/diff_highlight.dart b/packages/syntax_core/lib/src/diff/diff_highlight.dart similarity index 100% rename from packages/syntax/lib/src/diff/diff_highlight.dart rename to packages/syntax_core/lib/src/diff/diff_highlight.dart diff --git a/packages/syntax/lib/src/diff/diff_labels.dart b/packages/syntax_core/lib/src/diff/diff_labels.dart similarity index 100% rename from packages/syntax/lib/src/diff/diff_labels.dart rename to packages/syntax_core/lib/src/diff/diff_labels.dart diff --git a/packages/syntax/lib/src/diff/diff_layout.dart b/packages/syntax_core/lib/src/diff/diff_layout.dart similarity index 100% rename from packages/syntax/lib/src/diff/diff_layout.dart rename to packages/syntax_core/lib/src/diff/diff_layout.dart diff --git a/packages/syntax/lib/src/diff/diff_texts.dart b/packages/syntax_core/lib/src/diff/diff_texts.dart similarity index 100% rename from packages/syntax/lib/src/diff/diff_texts.dart rename to packages/syntax_core/lib/src/diff/diff_texts.dart diff --git a/packages/syntax/lib/src/diff/file_diff.dart b/packages/syntax_core/lib/src/diff/file_diff.dart similarity index 100% rename from packages/syntax/lib/src/diff/file_diff.dart rename to packages/syntax_core/lib/src/diff/file_diff.dart diff --git a/packages/syntax/lib/src/diff/myers.dart b/packages/syntax_core/lib/src/diff/myers.dart similarity index 100% rename from packages/syntax/lib/src/diff/myers.dart rename to packages/syntax_core/lib/src/diff/myers.dart diff --git a/packages/syntax/lib/src/diff/parse_patch.dart b/packages/syntax_core/lib/src/diff/parse_patch.dart similarity index 100% rename from packages/syntax/lib/src/diff/parse_patch.dart rename to packages/syntax_core/lib/src/diff/parse_patch.dart diff --git a/packages/syntax/lib/src/diff/word_diff.dart b/packages/syntax_core/lib/src/diff/word_diff.dart similarity index 100% rename from packages/syntax/lib/src/diff/word_diff.dart rename to packages/syntax_core/lib/src/diff/word_diff.dart diff --git a/packages/syntax/lib/src/document.dart b/packages/syntax_core/lib/src/document.dart similarity index 100% rename from packages/syntax/lib/src/document.dart rename to packages/syntax_core/lib/src/document.dart diff --git a/packages/syntax/lib/src/grammar/grammar.dart b/packages/syntax_core/lib/src/grammar/grammar.dart similarity index 100% rename from packages/syntax/lib/src/grammar/grammar.dart rename to packages/syntax_core/lib/src/grammar/grammar.dart diff --git a/packages/syntax/lib/src/grammar/matcher.dart b/packages/syntax_core/lib/src/grammar/matcher.dart similarity index 100% rename from packages/syntax/lib/src/grammar/matcher.dart rename to packages/syntax_core/lib/src/grammar/matcher.dart diff --git a/packages/syntax/lib/src/grammar/raw_map.dart b/packages/syntax_core/lib/src/grammar/raw_map.dart similarity index 100% rename from packages/syntax/lib/src/grammar/raw_map.dart rename to packages/syntax_core/lib/src/grammar/raw_map.dart diff --git a/packages/syntax/lib/src/grammar/rules.dart b/packages/syntax_core/lib/src/grammar/rules.dart similarity index 100% rename from packages/syntax/lib/src/grammar/rules.dart rename to packages/syntax_core/lib/src/grammar/rules.dart diff --git a/packages/syntax/lib/src/grammar/scope_stack.dart b/packages/syntax_core/lib/src/grammar/scope_stack.dart similarity index 100% rename from packages/syntax/lib/src/grammar/scope_stack.dart rename to packages/syntax_core/lib/src/grammar/scope_stack.dart diff --git a/packages/syntax/lib/src/grammar/state_stack.dart b/packages/syntax_core/lib/src/grammar/state_stack.dart similarity index 100% rename from packages/syntax/lib/src/grammar/state_stack.dart rename to packages/syntax_core/lib/src/grammar/state_stack.dart diff --git a/packages/syntax/lib/src/highlighter.dart b/packages/syntax_core/lib/src/highlighter.dart similarity index 100% rename from packages/syntax/lib/src/highlighter.dart rename to packages/syntax_core/lib/src/highlighter.dart diff --git a/packages/syntax/lib/src/presentation.dart b/packages/syntax_core/lib/src/presentation.dart similarity index 100% rename from packages/syntax/lib/src/presentation.dart rename to packages/syntax_core/lib/src/presentation.dart diff --git a/packages/syntax/lib/src/regex/engine.dart b/packages/syntax_core/lib/src/regex/engine.dart similarity index 100% rename from packages/syntax/lib/src/regex/engine.dart rename to packages/syntax_core/lib/src/regex/engine.dart diff --git a/packages/syntax/lib/src/regex/onig_ast.dart b/packages/syntax_core/lib/src/regex/onig_ast.dart similarity index 100% rename from packages/syntax/lib/src/regex/onig_ast.dart rename to packages/syntax_core/lib/src/regex/onig_ast.dart diff --git a/packages/syntax/lib/src/regex/onig_emitter.dart b/packages/syntax_core/lib/src/regex/onig_emitter.dart similarity index 100% rename from packages/syntax/lib/src/regex/onig_emitter.dart rename to packages/syntax_core/lib/src/regex/onig_emitter.dart diff --git a/packages/syntax/lib/src/regex/onig_parser.dart b/packages/syntax_core/lib/src/regex/onig_parser.dart similarity index 100% rename from packages/syntax/lib/src/regex/onig_parser.dart rename to packages/syntax_core/lib/src/regex/onig_parser.dart diff --git a/packages/syntax/lib/src/regex/onig_translator.dart b/packages/syntax_core/lib/src/regex/onig_translator.dart similarity index 100% rename from packages/syntax/lib/src/regex/onig_translator.dart rename to packages/syntax_core/lib/src/regex/onig_translator.dart diff --git a/packages/syntax/lib/src/regex/runtime_native.dart b/packages/syntax_core/lib/src/regex/runtime_native.dart similarity index 100% rename from packages/syntax/lib/src/regex/runtime_native.dart rename to packages/syntax_core/lib/src/regex/runtime_native.dart diff --git a/packages/syntax/lib/src/regex/runtime_web.dart b/packages/syntax_core/lib/src/regex/runtime_web.dart similarity index 100% rename from packages/syntax/lib/src/regex/runtime_web.dart rename to packages/syntax_core/lib/src/regex/runtime_web.dart diff --git a/packages/syntax/lib/src/regex/unicode_properties.dart b/packages/syntax_core/lib/src/regex/unicode_properties.dart similarity index 100% rename from packages/syntax/lib/src/regex/unicode_properties.dart rename to packages/syntax_core/lib/src/regex/unicode_properties.dart diff --git a/packages/syntax/lib/src/render.dart b/packages/syntax_core/lib/src/render.dart similarity index 100% rename from packages/syntax/lib/src/render.dart rename to packages/syntax_core/lib/src/render.dart diff --git a/packages/syntax/lib/src/row_height_index.dart b/packages/syntax_core/lib/src/row_height_index.dart similarity index 100% rename from packages/syntax/lib/src/row_height_index.dart rename to packages/syntax_core/lib/src/row_height_index.dart diff --git a/packages/syntax/lib/src/theme/theme.dart b/packages/syntax_core/lib/src/theme/theme.dart similarity index 100% rename from packages/syntax/lib/src/theme/theme.dart rename to packages/syntax_core/lib/src/theme/theme.dart diff --git a/packages/syntax/lib/syntax.dart b/packages/syntax_core/lib/syntax.dart similarity index 81% rename from packages/syntax/lib/syntax.dart rename to packages/syntax_core/lib/syntax.dart index baaca77..3d4bc86 100644 --- a/packages/syntax/lib/syntax.dart +++ b/packages/syntax_core/lib/syntax.dart @@ -1,16 +1,16 @@ /// TextMate-grammar syntax highlighting in pure Dart. /// /// ```dart -/// import 'package:syntax/syntax.dart'; -/// import 'package:syntax/langs/dart.dart'; -/// import 'package:syntax/themes/github_dark.dart'; +/// import 'package:syntax_core/syntax.dart'; +/// import 'package:syntax_core/langs/dart.dart'; +/// import 'package:syntax_core/themes/github_dark.dart'; /// /// final highlighter = Highlighter(languages: [dartLanguage]); /// print(highlighter.toAnsi(code, language: 'dart', theme: githubDarkTheme)); /// ``` /// -/// Bundled grammars live under `package:syntax/langs/` and themes under -/// `package:syntax/themes/`. Import only the ones you need, so the rest are +/// Bundled grammars live under `package:syntax_core/langs/` and themes under +/// `package:syntax_core/themes/`. Import only the ones you need, so the rest are /// tree-shaken. Any VS Code grammar or theme JSON can also be loaded at /// runtime with [Language.fromJson] and [SyntaxTheme.fromJson]. library; diff --git a/packages/syntax/lib/themes/all.dart b/packages/syntax_core/lib/themes/all.dart similarity index 96% rename from packages/syntax/lib/themes/all.dart rename to packages/syntax_core/lib/themes/all.dart index 3db363c..2cda82c 100644 --- a/packages/syntax/lib/themes/all.dart +++ b/packages/syntax_core/lib/themes/all.dart @@ -2,7 +2,7 @@ // // Importing this library pulls in every bundled entry. Import // individual files instead to keep app size down. -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; import 'catppuccin_latte.dart'; import 'catppuccin_mocha.dart'; diff --git a/packages/syntax/lib/themes/catppuccin_latte.dart b/packages/syntax_core/lib/themes/catppuccin_latte.dart similarity index 99% rename from packages/syntax/lib/themes/catppuccin_latte.dart rename to packages/syntax_core/lib/themes/catppuccin_latte.dart index 8f854b6..7cf0dea 100644 --- a/packages/syntax/lib/themes/catppuccin_latte.dart +++ b/packages/syntax_core/lib/themes/catppuccin_latte.dart @@ -2,7 +2,7 @@ // Source: https://github.com/catppuccin/vscode/blob/befc9e6fc41980f4241408f7049755d47c06ff45/packages/catppuccin-vsc/package.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Catppuccin Latte. const catppuccinLatteTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/catppuccin_mocha.dart b/packages/syntax_core/lib/themes/catppuccin_mocha.dart similarity index 99% rename from packages/syntax/lib/themes/catppuccin_mocha.dart rename to packages/syntax_core/lib/themes/catppuccin_mocha.dart index 9271057..7e431f1 100644 --- a/packages/syntax/lib/themes/catppuccin_mocha.dart +++ b/packages/syntax_core/lib/themes/catppuccin_mocha.dart @@ -2,7 +2,7 @@ // Source: https://github.com/catppuccin/vscode/blob/befc9e6fc41980f4241408f7049755d47c06ff45/packages/catppuccin-vsc/package.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Catppuccin Mocha. const catppuccinMochaTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/dark_plus.dart b/packages/syntax_core/lib/themes/dark_plus.dart similarity index 99% rename from packages/syntax/lib/themes/dark_plus.dart rename to packages/syntax_core/lib/themes/dark_plus.dart index 9be83d5..69d1bbe 100644 --- a/packages/syntax/lib/themes/dark_plus.dart +++ b/packages/syntax_core/lib/themes/dark_plus.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/e061feef09c2a09a59d0a88ab186aa880b3c56c3/extensions/theme-defaults/themes/dark_plus.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Dark Plus. const darkPlusTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/dracula.dart b/packages/syntax_core/lib/themes/dracula.dart similarity index 99% rename from packages/syntax/lib/themes/dracula.dart rename to packages/syntax_core/lib/themes/dracula.dart index 8eebe80..39ed171 100644 --- a/packages/syntax/lib/themes/dracula.dart +++ b/packages/syntax_core/lib/themes/dracula.dart @@ -2,7 +2,7 @@ // Source: https://github.com/dracula/visual-studio-code/blob/61743d6ea21cde34d9ad1009ec784ffe6f5e457c/src/dracula.yml // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Dracula Theme. const draculaTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/github_dark.dart b/packages/syntax_core/lib/themes/github_dark.dart similarity index 99% rename from packages/syntax/lib/themes/github_dark.dart rename to packages/syntax_core/lib/themes/github_dark.dart index 9032a32..4f90baf 100644 --- a/packages/syntax/lib/themes/github_dark.dart +++ b/packages/syntax_core/lib/themes/github_dark.dart @@ -2,7 +2,7 @@ // Source: https://github.com/primer/github-vscode-theme/blob/f7a67d67fc2302a0ec36ddfb7bdd57142f4575e8/src/theme.js // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// GitHub Dark. const githubDarkTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/github_light.dart b/packages/syntax_core/lib/themes/github_light.dart similarity index 99% rename from packages/syntax/lib/themes/github_light.dart rename to packages/syntax_core/lib/themes/github_light.dart index e11ebeb..4db0f69 100644 --- a/packages/syntax/lib/themes/github_light.dart +++ b/packages/syntax_core/lib/themes/github_light.dart @@ -2,7 +2,7 @@ // Source: https://github.com/primer/github-vscode-theme/blob/f7a67d67fc2302a0ec36ddfb7bdd57142f4575e8/src/theme.js // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// GitHub Light. const githubLightTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/light_plus.dart b/packages/syntax_core/lib/themes/light_plus.dart similarity index 99% rename from packages/syntax/lib/themes/light_plus.dart rename to packages/syntax_core/lib/themes/light_plus.dart index b9557d3..2ace31a 100644 --- a/packages/syntax/lib/themes/light_plus.dart +++ b/packages/syntax_core/lib/themes/light_plus.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/09fe3fcbc1514bc35742dc4325d05b7d7adfcad2/extensions/theme-defaults/themes/light_plus.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Light Plus. const lightPlusTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/min_light.dart b/packages/syntax_core/lib/themes/min_light.dart similarity index 99% rename from packages/syntax/lib/themes/min_light.dart rename to packages/syntax_core/lib/themes/min_light.dart index fea71b2..aaaa5b6 100644 --- a/packages/syntax/lib/themes/min_light.dart +++ b/packages/syntax_core/lib/themes/min_light.dart @@ -2,7 +2,7 @@ // Source: https://github.com/misolori/min-theme/blob/4641b5d395b9a3506572ec717e80ae8c7cdaae2a/themes/min-light.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Min Light. const minLightTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/monokai.dart b/packages/syntax_core/lib/themes/monokai.dart similarity index 99% rename from packages/syntax/lib/themes/monokai.dart rename to packages/syntax_core/lib/themes/monokai.dart index be66fcd..961fe45 100644 --- a/packages/syntax/lib/themes/monokai.dart +++ b/packages/syntax_core/lib/themes/monokai.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/e886f3e07de31233c89ecdba812b05bfd07616d7/extensions/theme-monokai/themes/monokai-color-theme.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Monokai. const monokaiTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/nord.dart b/packages/syntax_core/lib/themes/nord.dart similarity index 99% rename from packages/syntax/lib/themes/nord.dart rename to packages/syntax_core/lib/themes/nord.dart index d46f1b2..bdd23d9 100644 --- a/packages/syntax/lib/themes/nord.dart +++ b/packages/syntax_core/lib/themes/nord.dart @@ -2,7 +2,7 @@ // Source: https://github.com/arcticicestudio/nord-visual-studio-code/blob/27045851c5154fe2d9b116e7491c596cdcd72275/themes/nord-color-theme.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Nord. const nordTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/one_dark_pro.dart b/packages/syntax_core/lib/themes/one_dark_pro.dart similarity index 99% rename from packages/syntax/lib/themes/one_dark_pro.dart rename to packages/syntax_core/lib/themes/one_dark_pro.dart index 9ad6002..067a1b9 100644 --- a/packages/syntax/lib/themes/one_dark_pro.dart +++ b/packages/syntax_core/lib/themes/one_dark_pro.dart @@ -2,7 +2,7 @@ // Source: https://github.com/Binaryify/OneDark-Pro/blob/194ac088df050c97ff0dd64f8a6a38221d2971ca/themes/OneDark-Pro.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// One Dark Pro. const oneDarkProTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/solarized_light.dart b/packages/syntax_core/lib/themes/solarized_light.dart similarity index 99% rename from packages/syntax/lib/themes/solarized_light.dart rename to packages/syntax_core/lib/themes/solarized_light.dart index 1eb8821..f1c3f65 100644 --- a/packages/syntax/lib/themes/solarized_light.dart +++ b/packages/syntax_core/lib/themes/solarized_light.dart @@ -2,7 +2,7 @@ // Source: https://github.com/microsoft/vscode/blob/0132168df99ab8830a1eb158b1a5e8242f3e94ff/extensions/theme-solarized-light/themes/solarized-light-color-theme.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Solarized Light. const solarizedLightTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/tokyo_night.dart b/packages/syntax_core/lib/themes/tokyo_night.dart similarity index 99% rename from packages/syntax/lib/themes/tokyo_night.dart rename to packages/syntax_core/lib/themes/tokyo_night.dart index efa0f92..83301d7 100644 --- a/packages/syntax/lib/themes/tokyo_night.dart +++ b/packages/syntax_core/lib/themes/tokyo_night.dart @@ -2,7 +2,7 @@ // Source: https://github.com/enkia/tokyo-night-vscode-theme/blob/da5546bc4163a02a30d6f3ced90d4ef7dfcb8460/themes/tokyo-night-color-theme.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Tokyo Night. const tokyoNightTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/vitesse_dark.dart b/packages/syntax_core/lib/themes/vitesse_dark.dart similarity index 99% rename from packages/syntax/lib/themes/vitesse_dark.dart rename to packages/syntax_core/lib/themes/vitesse_dark.dart index 86aff75..3c936ff 100644 --- a/packages/syntax/lib/themes/vitesse_dark.dart +++ b/packages/syntax_core/lib/themes/vitesse_dark.dart @@ -2,7 +2,7 @@ // Source: https://github.com/antfu/vscode-theme-vitesse/blob/625a5e6fffd15e440e574f353ae0ba777b41d47f/themes/vitesse-dark.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Vitesse Dark. const vitesseDarkTheme = SyntaxTheme( diff --git a/packages/syntax/lib/themes/vitesse_light.dart b/packages/syntax_core/lib/themes/vitesse_light.dart similarity index 99% rename from packages/syntax/lib/themes/vitesse_light.dart rename to packages/syntax_core/lib/themes/vitesse_light.dart index 4d9113e..f0da7ff 100644 --- a/packages/syntax/lib/themes/vitesse_light.dart +++ b/packages/syntax_core/lib/themes/vitesse_light.dart @@ -2,7 +2,7 @@ // Source: https://github.com/antfu/vscode-theme-vitesse/blob/625a5e6fffd15e440e574f353ae0ba777b41d47f/themes/vitesse-light.json // License: MIT // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars -import 'package:syntax/syntax.dart' show SyntaxTheme; +import 'package:syntax_core/syntax.dart' show SyntaxTheme; /// Vitesse Light. const vitesseLightTheme = SyntaxTheme( diff --git a/packages/syntax/pubspec.yaml b/packages/syntax_core/pubspec.yaml similarity index 96% rename from packages/syntax/pubspec.yaml rename to packages/syntax_core/pubspec.yaml index 65d70a7..17be144 100644 --- a/packages/syntax/pubspec.yaml +++ b/packages/syntax_core/pubspec.yaml @@ -1,4 +1,4 @@ -name: syntax +name: syntax_core description: >- TextMate-grammar syntax highlighting in pure Dart. Tokenizes code with VS Code grammars and themes and renders tokens, diffs, HTML, or ANSI. No Flutter diff --git a/packages/syntax/test/bundled_grammars_test.dart b/packages/syntax_core/test/bundled_grammars_test.dart similarity index 94% rename from packages/syntax/test/bundled_grammars_test.dart rename to packages/syntax_core/test/bundled_grammars_test.dart index cc19674..4a906bf 100644 --- a/packages/syntax/test/bundled_grammars_test.dart +++ b/packages/syntax_core/test/bundled_grammars_test.dart @@ -1,5 +1,5 @@ -import 'package:syntax/langs/all.dart'; -import 'package:syntax/src/regex/onig_translator.dart'; +import 'package:syntax_core/langs/all.dart'; +import 'package:syntax_core/src/regex/onig_translator.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/syntax/test/conformance_test.dart b/packages/syntax_core/test/conformance_test.dart similarity index 97% rename from packages/syntax/test/conformance_test.dart rename to packages/syntax_core/test/conformance_test.dart index 8c9698b..63faab0 100644 --- a/packages/syntax/test/conformance_test.dart +++ b/packages/syntax_core/test/conformance_test.dart @@ -8,9 +8,9 @@ import 'dart:convert'; import 'dart:io'; -import 'package:syntax/syntax.dart'; -import 'package:syntax/langs/all.dart'; -import 'package:syntax/themes/all.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/langs/all.dart'; +import 'package:syntax_core/themes/all.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/syntax/test/diff_test.dart b/packages/syntax_core/test/diff_test.dart similarity index 98% rename from packages/syntax/test/diff_test.dart rename to packages/syntax_core/test/diff_test.dart index 5026036..29bdbf3 100644 --- a/packages/syntax/test/diff_test.dart +++ b/packages/syntax_core/test/diff_test.dart @@ -1,17 +1,17 @@ import 'dart:io'; import 'dart:math'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/langs/diff.dart'; -import 'package:syntax/langs/html.dart'; -import 'package:syntax/langs/markdown.dart'; -import 'package:syntax/langs/shellscript.dart'; -import 'package:syntax/langs/xml.dart'; -import 'package:syntax/langs/yaml.dart'; -import 'package:syntax/src/diff/myers.dart'; -import 'package:syntax/syntax.dart'; -import 'package:syntax/themes/github_dark.dart'; -import 'package:syntax/themes/light_plus.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/langs/diff.dart'; +import 'package:syntax_core/langs/html.dart'; +import 'package:syntax_core/langs/markdown.dart'; +import 'package:syntax_core/langs/shellscript.dart'; +import 'package:syntax_core/langs/xml.dart'; +import 'package:syntax_core/langs/yaml.dart'; +import 'package:syntax_core/src/diff/myers.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/themes/github_dark.dart'; +import 'package:syntax_core/themes/light_plus.dart'; import 'package:test/test.dart'; String fixture(String name) => diff --git a/packages/syntax/test/document_test.dart b/packages/syntax_core/test/document_test.dart similarity index 96% rename from packages/syntax/test/document_test.dart rename to packages/syntax_core/test/document_test.dart index 0f9e536..15bf756 100644 --- a/packages/syntax/test/document_test.dart +++ b/packages/syntax_core/test/document_test.dart @@ -1,10 +1,10 @@ import 'dart:math'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/langs/json.dart'; -import 'package:syntax/syntax.dart'; -import 'package:syntax/themes/github_dark.dart'; -import 'package:syntax/themes/github_light.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/langs/json.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/themes/github_dark.dart'; +import 'package:syntax_core/themes/github_light.dart'; import 'package:test/test.dart'; final highlighter = Highlighter(languages: [dartLanguage, jsonLanguage]); diff --git a/packages/syntax/test/engine_test.dart b/packages/syntax_core/test/engine_test.dart similarity index 98% rename from packages/syntax/test/engine_test.dart rename to packages/syntax_core/test/engine_test.dart index 6ed7f4f..e69e499 100644 --- a/packages/syntax/test/engine_test.dart +++ b/packages/syntax_core/test/engine_test.dart @@ -1,4 +1,4 @@ -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; import 'package:test/test.dart'; /// Every scan through both scanner implementations, so the combined diff --git a/packages/syntax/test/fixtures/README.md b/packages/syntax_core/test/fixtures/README.md similarity index 100% rename from packages/syntax/test/fixtures/README.md rename to packages/syntax_core/test/fixtures/README.md diff --git a/packages/syntax/test/fixtures/diff/edge.patch b/packages/syntax_core/test/fixtures/diff/edge.patch similarity index 100% rename from packages/syntax/test/fixtures/diff/edge.patch rename to packages/syntax_core/test/fixtures/diff/edge.patch diff --git a/packages/syntax/test/fixtures/diff/lib.after.txt b/packages/syntax_core/test/fixtures/diff/lib.after.txt similarity index 100% rename from packages/syntax/test/fixtures/diff/lib.after.txt rename to packages/syntax_core/test/fixtures/diff/lib.after.txt diff --git a/packages/syntax/test/fixtures/diff/lib.before.txt b/packages/syntax_core/test/fixtures/diff/lib.before.txt similarity index 100% rename from packages/syntax/test/fixtures/diff/lib.before.txt rename to packages/syntax_core/test/fixtures/diff/lib.before.txt diff --git a/packages/syntax/test/fixtures/diff/lib.patch b/packages/syntax_core/test/fixtures/diff/lib.patch similarity index 100% rename from packages/syntax/test/fixtures/diff/lib.patch rename to packages/syntax_core/test/fixtures/diff/lib.patch diff --git a/packages/syntax/test/fixtures/diff/multi.patch b/packages/syntax_core/test/fixtures/diff/multi.patch similarity index 100% rename from packages/syntax/test/fixtures/diff/multi.patch rename to packages/syntax_core/test/fixtures/diff/multi.patch diff --git a/packages/syntax/test/fixtures/golden/css.json b/packages/syntax_core/test/fixtures/golden/css.json similarity index 100% rename from packages/syntax/test/fixtures/golden/css.json rename to packages/syntax_core/test/fixtures/golden/css.json diff --git a/packages/syntax/test/fixtures/golden/dart.json b/packages/syntax_core/test/fixtures/golden/dart.json similarity index 100% rename from packages/syntax/test/fixtures/golden/dart.json rename to packages/syntax_core/test/fixtures/golden/dart.json diff --git a/packages/syntax/test/fixtures/golden/dart.modern.json b/packages/syntax_core/test/fixtures/golden/dart.modern.json similarity index 100% rename from packages/syntax/test/fixtures/golden/dart.modern.json rename to packages/syntax_core/test/fixtures/golden/dart.modern.json diff --git a/packages/syntax/test/fixtures/golden/diff.json b/packages/syntax_core/test/fixtures/golden/diff.json similarity index 100% rename from packages/syntax/test/fixtures/golden/diff.json rename to packages/syntax_core/test/fixtures/golden/diff.json diff --git a/packages/syntax/test/fixtures/golden/go.json b/packages/syntax_core/test/fixtures/golden/go.json similarity index 100% rename from packages/syntax/test/fixtures/golden/go.json rename to packages/syntax_core/test/fixtures/golden/go.json diff --git a/packages/syntax/test/fixtures/golden/html.json b/packages/syntax_core/test/fixtures/golden/html.json similarity index 100% rename from packages/syntax/test/fixtures/golden/html.json rename to packages/syntax_core/test/fixtures/golden/html.json diff --git a/packages/syntax/test/fixtures/golden/javascript.json b/packages/syntax_core/test/fixtures/golden/javascript.json similarity index 100% rename from packages/syntax/test/fixtures/golden/javascript.json rename to packages/syntax_core/test/fixtures/golden/javascript.json diff --git a/packages/syntax/test/fixtures/golden/json.json b/packages/syntax_core/test/fixtures/golden/json.json similarity index 100% rename from packages/syntax/test/fixtures/golden/json.json rename to packages/syntax_core/test/fixtures/golden/json.json diff --git a/packages/syntax/test/fixtures/golden/jsonc.json b/packages/syntax_core/test/fixtures/golden/jsonc.json similarity index 100% rename from packages/syntax/test/fixtures/golden/jsonc.json rename to packages/syntax_core/test/fixtures/golden/jsonc.json diff --git a/packages/syntax/test/fixtures/golden/kotlin.json b/packages/syntax_core/test/fixtures/golden/kotlin.json similarity index 100% rename from packages/syntax/test/fixtures/golden/kotlin.json rename to packages/syntax_core/test/fixtures/golden/kotlin.json diff --git a/packages/syntax/test/fixtures/golden/markdown.fences.json b/packages/syntax_core/test/fixtures/golden/markdown.fences.json similarity index 100% rename from packages/syntax/test/fixtures/golden/markdown.fences.json rename to packages/syntax_core/test/fixtures/golden/markdown.fences.json diff --git a/packages/syntax/test/fixtures/golden/markdown.json b/packages/syntax_core/test/fixtures/golden/markdown.json similarity index 100% rename from packages/syntax/test/fixtures/golden/markdown.json rename to packages/syntax_core/test/fixtures/golden/markdown.json diff --git a/packages/syntax/test/fixtures/golden/python.json b/packages/syntax_core/test/fixtures/golden/python.json similarity index 100% rename from packages/syntax/test/fixtures/golden/python.json rename to packages/syntax_core/test/fixtures/golden/python.json diff --git a/packages/syntax/test/fixtures/golden/rust.json b/packages/syntax_core/test/fixtures/golden/rust.json similarity index 100% rename from packages/syntax/test/fixtures/golden/rust.json rename to packages/syntax_core/test/fixtures/golden/rust.json diff --git a/packages/syntax/test/fixtures/golden/shellscript.json b/packages/syntax_core/test/fixtures/golden/shellscript.json similarity index 100% rename from packages/syntax/test/fixtures/golden/shellscript.json rename to packages/syntax_core/test/fixtures/golden/shellscript.json diff --git a/packages/syntax/test/fixtures/golden/sql.json b/packages/syntax_core/test/fixtures/golden/sql.json similarity index 100% rename from packages/syntax/test/fixtures/golden/sql.json rename to packages/syntax_core/test/fixtures/golden/sql.json diff --git a/packages/syntax/test/fixtures/golden/swift.json b/packages/syntax_core/test/fixtures/golden/swift.json similarity index 100% rename from packages/syntax/test/fixtures/golden/swift.json rename to packages/syntax_core/test/fixtures/golden/swift.json diff --git a/packages/syntax/test/fixtures/golden/typescript.json b/packages/syntax_core/test/fixtures/golden/typescript.json similarity index 100% rename from packages/syntax/test/fixtures/golden/typescript.json rename to packages/syntax_core/test/fixtures/golden/typescript.json diff --git a/packages/syntax/test/fixtures/golden/xml.json b/packages/syntax_core/test/fixtures/golden/xml.json similarity index 100% rename from packages/syntax/test/fixtures/golden/xml.json rename to packages/syntax_core/test/fixtures/golden/xml.json diff --git a/packages/syntax/test/fixtures/golden/yaml.json b/packages/syntax_core/test/fixtures/golden/yaml.json similarity index 100% rename from packages/syntax/test/fixtures/golden/yaml.json rename to packages/syntax_core/test/fixtures/golden/yaml.json diff --git a/packages/syntax/test/fixtures/golden/yaml.pubspec.json b/packages/syntax_core/test/fixtures/golden/yaml.pubspec.json similarity index 100% rename from packages/syntax/test/fixtures/golden/yaml.pubspec.json rename to packages/syntax_core/test/fixtures/golden/yaml.pubspec.json diff --git a/packages/syntax/test/fixtures/samples/css.sample b/packages/syntax_core/test/fixtures/samples/css.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/css.sample rename to packages/syntax_core/test/fixtures/samples/css.sample diff --git a/packages/syntax/test/fixtures/samples/dart.modern.sample b/packages/syntax_core/test/fixtures/samples/dart.modern.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/dart.modern.sample rename to packages/syntax_core/test/fixtures/samples/dart.modern.sample diff --git a/packages/syntax/test/fixtures/samples/dart.sample b/packages/syntax_core/test/fixtures/samples/dart.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/dart.sample rename to packages/syntax_core/test/fixtures/samples/dart.sample diff --git a/packages/syntax/test/fixtures/samples/diff.sample b/packages/syntax_core/test/fixtures/samples/diff.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/diff.sample rename to packages/syntax_core/test/fixtures/samples/diff.sample diff --git a/packages/syntax/test/fixtures/samples/go.sample b/packages/syntax_core/test/fixtures/samples/go.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/go.sample rename to packages/syntax_core/test/fixtures/samples/go.sample diff --git a/packages/syntax/test/fixtures/samples/html.sample b/packages/syntax_core/test/fixtures/samples/html.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/html.sample rename to packages/syntax_core/test/fixtures/samples/html.sample diff --git a/packages/syntax/test/fixtures/samples/javascript.sample b/packages/syntax_core/test/fixtures/samples/javascript.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/javascript.sample rename to packages/syntax_core/test/fixtures/samples/javascript.sample diff --git a/packages/syntax/test/fixtures/samples/json.sample b/packages/syntax_core/test/fixtures/samples/json.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/json.sample rename to packages/syntax_core/test/fixtures/samples/json.sample diff --git a/packages/syntax/test/fixtures/samples/jsonc.sample b/packages/syntax_core/test/fixtures/samples/jsonc.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/jsonc.sample rename to packages/syntax_core/test/fixtures/samples/jsonc.sample diff --git a/packages/syntax/test/fixtures/samples/kotlin.sample b/packages/syntax_core/test/fixtures/samples/kotlin.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/kotlin.sample rename to packages/syntax_core/test/fixtures/samples/kotlin.sample diff --git a/packages/syntax/test/fixtures/samples/markdown.fences.sample b/packages/syntax_core/test/fixtures/samples/markdown.fences.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/markdown.fences.sample rename to packages/syntax_core/test/fixtures/samples/markdown.fences.sample diff --git a/packages/syntax/test/fixtures/samples/markdown.sample b/packages/syntax_core/test/fixtures/samples/markdown.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/markdown.sample rename to packages/syntax_core/test/fixtures/samples/markdown.sample diff --git a/packages/syntax/test/fixtures/samples/python.sample b/packages/syntax_core/test/fixtures/samples/python.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/python.sample rename to packages/syntax_core/test/fixtures/samples/python.sample diff --git a/packages/syntax/test/fixtures/samples/rust.sample b/packages/syntax_core/test/fixtures/samples/rust.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/rust.sample rename to packages/syntax_core/test/fixtures/samples/rust.sample diff --git a/packages/syntax/test/fixtures/samples/shellscript.sample b/packages/syntax_core/test/fixtures/samples/shellscript.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/shellscript.sample rename to packages/syntax_core/test/fixtures/samples/shellscript.sample diff --git a/packages/syntax/test/fixtures/samples/sql.sample b/packages/syntax_core/test/fixtures/samples/sql.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/sql.sample rename to packages/syntax_core/test/fixtures/samples/sql.sample diff --git a/packages/syntax/test/fixtures/samples/swift.sample b/packages/syntax_core/test/fixtures/samples/swift.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/swift.sample rename to packages/syntax_core/test/fixtures/samples/swift.sample diff --git a/packages/syntax/test/fixtures/samples/typescript.sample b/packages/syntax_core/test/fixtures/samples/typescript.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/typescript.sample rename to packages/syntax_core/test/fixtures/samples/typescript.sample diff --git a/packages/syntax/test/fixtures/samples/xml.sample b/packages/syntax_core/test/fixtures/samples/xml.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/xml.sample rename to packages/syntax_core/test/fixtures/samples/xml.sample diff --git a/packages/syntax/test/fixtures/samples/yaml.pubspec.sample b/packages/syntax_core/test/fixtures/samples/yaml.pubspec.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/yaml.pubspec.sample rename to packages/syntax_core/test/fixtures/samples/yaml.pubspec.sample diff --git a/packages/syntax/test/fixtures/samples/yaml.sample b/packages/syntax_core/test/fixtures/samples/yaml.sample similarity index 100% rename from packages/syntax/test/fixtures/samples/yaml.sample rename to packages/syntax_core/test/fixtures/samples/yaml.sample diff --git a/packages/syntax/test/highlighter_test.dart b/packages/syntax_core/test/highlighter_test.dart similarity index 98% rename from packages/syntax/test/highlighter_test.dart rename to packages/syntax_core/test/highlighter_test.dart index 4507171..de43e7f 100644 --- a/packages/syntax/test/highlighter_test.dart +++ b/packages/syntax_core/test/highlighter_test.dart @@ -1,8 +1,8 @@ -import 'package:syntax/syntax.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/langs/json.dart'; -import 'package:syntax/langs/markdown.dart'; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/langs/json.dart'; +import 'package:syntax_core/langs/markdown.dart'; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/syntax/test/presentation_test.dart b/packages/syntax_core/test/presentation_test.dart similarity index 97% rename from packages/syntax/test/presentation_test.dart rename to packages/syntax_core/test/presentation_test.dart index 35aa6de..08928a9 100644 --- a/packages/syntax/test/presentation_test.dart +++ b/packages/syntax_core/test/presentation_test.dart @@ -1,7 +1,7 @@ -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart'; -import 'package:syntax/themes/github_dark.dart'; -import 'package:syntax/themes/github_light.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart'; +import 'package:syntax_core/themes/github_dark.dart'; +import 'package:syntax_core/themes/github_light.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/syntax/test/translator_test.dart b/packages/syntax_core/test/translator_test.dart similarity index 98% rename from packages/syntax/test/translator_test.dart rename to packages/syntax_core/test/translator_test.dart index 148c005..ed2c6c6 100644 --- a/packages/syntax/test/translator_test.dart +++ b/packages/syntax_core/test/translator_test.dart @@ -1,5 +1,5 @@ -import 'package:syntax/src/regex/engine.dart'; -import 'package:syntax/src/regex/onig_translator.dart'; +import 'package:syntax_core/src/regex/engine.dart'; +import 'package:syntax_core/src/regex/onig_translator.dart'; import 'package:test/test.dart'; /// Runs [pattern] the way the tokenizer does: on a line with a trailing diff --git a/packages/syntax/tool/coverage.dart b/packages/syntax_core/tool/coverage.dart similarity index 97% rename from packages/syntax/tool/coverage.dart rename to packages/syntax_core/tool/coverage.dart index 85bfaf9..bf7b592 100644 --- a/packages/syntax/tool/coverage.dart +++ b/packages/syntax_core/tool/coverage.dart @@ -4,7 +4,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:syntax/src/regex/onig_translator.dart'; +import 'package:syntax_core/src/regex/onig_translator.dart'; void main(List args) { final dir = Directory(args.single); diff --git a/packages/syntax/tool/git_compare.dart b/packages/syntax_core/tool/git_compare.dart similarity index 99% rename from packages/syntax/tool/git_compare.dart rename to packages/syntax_core/tool/git_compare.dart index 9b45815..a639c18 100644 --- a/packages/syntax/tool/git_compare.dart +++ b/packages/syntax_core/tool/git_compare.dart @@ -33,7 +33,7 @@ import 'dart:io'; import 'dart:math'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; /// Rebuilds the new text by applying [diff] to [old]. String apply(String old, FileDiff diff) { diff --git a/packages/syntax/tool/stress.dart b/packages/syntax_core/tool/stress.dart similarity index 98% rename from packages/syntax/tool/stress.dart rename to packages/syntax_core/tool/stress.dart index 952e98e..af7eb0a 100644 --- a/packages/syntax/tool/stress.dart +++ b/packages/syntax_core/tool/stress.dart @@ -5,7 +5,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; void main(List args) { final stressDir = args[0]; diff --git a/packages/syntax_flutter/README.md b/packages/syntax_flutter/README.md index 2676774..f74bee4 100644 --- a/packages/syntax_flutter/README.md +++ b/packages/syntax_flutter/README.md @@ -1,12 +1,12 @@ # syntax_flutter -Flutter widgets for [syntax](https://pub.dev/packages/syntax): code highlighted with TextMate grammars +Flutter widgets for [syntax](https://pub.dev/packages/syntax_core): code highlighted with TextMate grammars and VS Code themes. ```dart -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/langs/yaml.dart'; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/langs/yaml.dart'; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:syntax_flutter/syntax_flutter.dart'; final highlighter = Highlighter(languages: [dartLanguage, yamlLanguage]); diff --git a/packages/syntax_flutter/example/lib/main.dart b/packages/syntax_flutter/example/lib/main.dart index addf0b7..abe6bcc 100644 --- a/packages/syntax_flutter/example/lib/main.dart +++ b/packages/syntax_flutter/example/lib/main.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:syntax/langs/all.dart'; -import 'package:syntax/themes/all.dart'; +import 'package:syntax_core/langs/all.dart'; +import 'package:syntax_core/themes/all.dart'; import 'package:syntax_flutter/syntax_flutter.dart'; import 'samples.dart'; diff --git a/packages/syntax_flutter/example/pubspec.yaml b/packages/syntax_flutter/example/pubspec.yaml index f6c0ddd..9f05fd5 100644 --- a/packages/syntax_flutter/example/pubspec.yaml +++ b/packages/syntax_flutter/example/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: flutter: sdk: flutter google_fonts: ">=8.0.0 <10.0.0" - syntax: ^0.0.1 + syntax_core: ^0.0.1 syntax_flutter: path: ../ dev_dependencies: diff --git a/packages/syntax_flutter/lib/src/chrome.dart b/packages/syntax_flutter/lib/src/chrome.dart index b3fd911..fed5490 100644 --- a/packages/syntax_flutter/lib/src/chrome.dart +++ b/packages/syntax_flutter/lib/src/chrome.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; import 'styles.dart'; diff --git a/packages/syntax_flutter/lib/src/highlighted_code.dart b/packages/syntax_flutter/lib/src/highlighted_code.dart index 590315d..1207f15 100644 --- a/packages/syntax_flutter/lib/src/highlighted_code.dart +++ b/packages/syntax_flutter/lib/src/highlighted_code.dart @@ -3,7 +3,7 @@ import 'dart:math' as math; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart' show ViewportOffset; import 'package:flutter/scheduler.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; import 'code_rows.dart'; import 'highlighter_scope.dart'; diff --git a/packages/syntax_flutter/lib/src/highlighter_scope.dart b/packages/syntax_flutter/lib/src/highlighter_scope.dart index 1e6d877..2b8c6a5 100644 --- a/packages/syntax_flutter/lib/src/highlighter_scope.dart +++ b/packages/syntax_flutter/lib/src/highlighter_scope.dart @@ -1,5 +1,5 @@ import 'package:flutter/widgets.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; /// Provides a [Highlighter] to [HighlightedCode] widgets below it, so the /// compiled grammars are shared. diff --git a/packages/syntax_flutter/lib/src/indexed_viewport.dart b/packages/syntax_flutter/lib/src/indexed_viewport.dart index 317248d..6e26687 100644 --- a/packages/syntax_flutter/lib/src/indexed_viewport.dart +++ b/packages/syntax_flutter/lib/src/indexed_viewport.dart @@ -2,7 +2,7 @@ import 'dart:math' as math; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; /// Scrollable list that measures only the rows it builds. /// Large unmounted ranges occupy estimated sliver space, so jumping to a diff --git a/packages/syntax_flutter/lib/src/patch_rows.dart b/packages/syntax_flutter/lib/src/patch_rows.dart index 3970553..c3387e1 100644 --- a/packages/syntax_flutter/lib/src/patch_rows.dart +++ b/packages/syntax_flutter/lib/src/patch_rows.dart @@ -1,7 +1,7 @@ import 'dart:math' as math; import 'package:flutter/material.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; import 'horizontal_scroll.dart'; import 'styles.dart'; diff --git a/packages/syntax_flutter/lib/src/patch_view.dart b/packages/syntax_flutter/lib/src/patch_view.dart index 2630e6d..d7dfd84 100644 --- a/packages/syntax_flutter/lib/src/patch_view.dart +++ b/packages/syntax_flutter/lib/src/patch_view.dart @@ -2,7 +2,7 @@ import 'dart:math' as math; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; import 'chrome.dart'; import 'highlighter_scope.dart'; diff --git a/packages/syntax_flutter/lib/src/styles.dart b/packages/syntax_flutter/lib/src/styles.dart index 637a9f5..6f558c2 100644 --- a/packages/syntax_flutter/lib/src/styles.dart +++ b/packages/syntax_flutter/lib/src/styles.dart @@ -1,5 +1,5 @@ import 'package:flutter/painting.dart'; -import 'package:syntax/syntax.dart'; +import 'package:syntax_core/syntax.dart'; /// A monospace style that resolves on every platform. const TextStyle defaultCodeTextStyle = TextStyle( diff --git a/packages/syntax_flutter/lib/syntax_flutter.dart b/packages/syntax_flutter/lib/syntax_flutter.dart index 720195a..0a6b953 100644 --- a/packages/syntax_flutter/lib/syntax_flutter.dart +++ b/packages/syntax_flutter/lib/syntax_flutter.dart @@ -1,15 +1,15 @@ -/// Flutter widgets for [syntax](https://pub.dev/packages/syntax): syntax +/// Flutter widgets for [syntax](https://pub.dev/packages/syntax_core): syntax /// highlighting with TextMate grammars and VS Code themes. /// /// - [HighlightedCode] shows read-only, highlighted code. /// - [PatchView] shows a diff or patch, unified or split. /// - [HighlighterScope] shares one [Highlighter] across the widget tree. /// -/// This library re-exports `package:syntax/syntax.dart`. Import grammars and -/// themes from `package:syntax/langs/...` and `package:syntax/themes/...`. +/// This library re-exports `package:syntax_core/syntax.dart`. Import grammars and +/// themes from `package:syntax_core/langs/...` and `package:syntax_core/themes/...`. library; -export 'package:syntax/syntax.dart'; +export 'package:syntax_core/syntax.dart'; export 'src/chrome.dart'; export 'src/highlighted_code.dart'; diff --git a/packages/syntax_flutter/pubspec.yaml b/packages/syntax_flutter/pubspec.yaml index 06faaab..9ab281a 100644 --- a/packages/syntax_flutter/pubspec.yaml +++ b/packages/syntax_flutter/pubspec.yaml @@ -18,7 +18,7 @@ resolution: workspace dependencies: flutter: sdk: flutter - syntax: ^0.0.1 + syntax_core: ^0.0.1 dev_dependencies: flutter_test: sdk: flutter diff --git a/packages/syntax_flutter/test/highlighted_code_test.dart b/packages/syntax_flutter/test/highlighted_code_test.dart index aec91c8..bfbf8fb 100644 --- a/packages/syntax_flutter/test/highlighted_code_test.dart +++ b/packages/syntax_flutter/test/highlighted_code_test.dart @@ -3,8 +3,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:syntax_flutter/src/code_rows.dart'; import 'package:syntax_flutter/syntax_flutter.dart'; diff --git a/packages/syntax_flutter/test/patch_view_test.dart b/packages/syntax_flutter/test/patch_view_test.dart index 522b091..4e33fe5 100644 --- a/packages/syntax_flutter/test/patch_view_test.dart +++ b/packages/syntax_flutter/test/patch_view_test.dart @@ -4,9 +4,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/themes/github_dark.dart'; -import 'package:syntax/themes/github_light.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/themes/github_dark.dart'; +import 'package:syntax_core/themes/github_light.dart'; import 'package:syntax_flutter/syntax_flutter.dart'; final highlighter = Highlighter(languages: [dartLanguage]); diff --git a/packages/syntax_flutter/test/syntax_flutter_test.dart b/packages/syntax_flutter/test/syntax_flutter_test.dart index 5b6528d..f42f2aa 100644 --- a/packages/syntax_flutter/test/syntax_flutter_test.dart +++ b/packages/syntax_flutter/test/syntax_flutter_test.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/langs/json.dart'; -import 'package:syntax/themes/github_dark.dart'; -import 'package:syntax/themes/github_light.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/langs/json.dart'; +import 'package:syntax_core/themes/github_dark.dart'; +import 'package:syntax_core/themes/github_light.dart'; import 'package:syntax_flutter/syntax_flutter.dart'; import 'code_helpers.dart'; diff --git a/packages/syntax_noir/README.md b/packages/syntax_noir/README.md index 8fe2cb0..70aa8a5 100644 --- a/packages/syntax_noir/README.md +++ b/packages/syntax_noir/README.md @@ -1,6 +1,6 @@ # syntax_noir -Terminal widgets for [syntax](https://pub.dev/packages/syntax) on +Terminal widgets for [syntax](https://pub.dev/packages/syntax_core) on [noir](https://pub.dev/packages/noir): code highlighted with TextMate grammars and VS Code themes, with the same colors as VS Code. @@ -11,9 +11,9 @@ import syntax with a prefix: ```dart import 'package:noir/noir.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart' as syntax; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart' as syntax; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:syntax_noir/syntax_noir.dart'; final highlighter = syntax.Highlighter(languages: [dartLanguage]); diff --git a/packages/syntax_noir/example/main.dart b/packages/syntax_noir/example/main.dart index 1cb3985..c8ec101 100644 --- a/packages/syntax_noir/example/main.dart +++ b/packages/syntax_noir/example/main.dart @@ -1,7 +1,7 @@ import 'package:noir/noir.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart' as syntax; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart' as syntax; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:syntax_noir/syntax_noir.dart'; // Run in a terminal: dart run example/main.dart diff --git a/packages/syntax_noir/lib/src/code_highlighter.dart b/packages/syntax_noir/lib/src/code_highlighter.dart index 26050ba..cd9fbd4 100644 --- a/packages/syntax_noir/lib/src/code_highlighter.dart +++ b/packages/syntax_noir/lib/src/code_highlighter.dart @@ -1,5 +1,5 @@ import 'package:noir/noir.dart'; -import 'package:syntax/syntax.dart' as syntax; +import 'package:syntax_core/syntax.dart' as syntax; import 'colors.dart'; diff --git a/packages/syntax_noir/lib/src/colors.dart b/packages/syntax_noir/lib/src/colors.dart index 4888fee..0bbf3b1 100644 --- a/packages/syntax_noir/lib/src/colors.dart +++ b/packages/syntax_noir/lib/src/colors.dart @@ -1,5 +1,5 @@ import 'package:noir/noir.dart'; -import 'package:syntax/syntax.dart' as syntax; +import 'package:syntax_core/syntax.dart' as syntax; /// An ARGB color from syntax as a noir [Color]. Terminals don't blend, so /// a translucent color is first painted over [over] when given. diff --git a/packages/syntax_noir/lib/src/patch_painter.dart b/packages/syntax_noir/lib/src/patch_painter.dart index 0b8ae70..6c62ba1 100644 --- a/packages/syntax_noir/lib/src/patch_painter.dart +++ b/packages/syntax_noir/lib/src/patch_painter.dart @@ -1,7 +1,7 @@ import 'dart:math' as math; import 'package:noir/noir.dart'; -import 'package:syntax/syntax.dart' as syntax; +import 'package:syntax_core/syntax.dart' as syntax; import 'colors.dart'; diff --git a/packages/syntax_noir/lib/src/patch_view.dart b/packages/syntax_noir/lib/src/patch_view.dart index 2d0290e..b57560f 100644 --- a/packages/syntax_noir/lib/src/patch_view.dart +++ b/packages/syntax_noir/lib/src/patch_view.dart @@ -1,7 +1,7 @@ import 'dart:math' as math; import 'package:noir/noir.dart'; -import 'package:syntax/syntax.dart' as syntax; +import 'package:syntax_core/syntax.dart' as syntax; import 'colors.dart'; import 'patch_painter.dart'; diff --git a/packages/syntax_noir/lib/syntax_noir.dart b/packages/syntax_noir/lib/syntax_noir.dart index 016be39..b573993 100644 --- a/packages/syntax_noir/lib/syntax_noir.dart +++ b/packages/syntax_noir/lib/syntax_noir.dart @@ -1,4 +1,4 @@ -/// Terminal widgets for [syntax](https://pub.dev/packages/syntax) on +/// Terminal widgets for [syntax](https://pub.dev/packages/syntax_core) on /// [noir](https://pub.dev/packages/noir): syntax highlighting with TextMate /// grammars and VS Code themes. /// @@ -12,7 +12,7 @@ /// /// ```dart /// import 'package:noir/noir.dart'; -/// import 'package:syntax/syntax.dart' as syntax; +/// import 'package:syntax_core/syntax.dart' as syntax; /// import 'package:syntax_noir/syntax_noir.dart'; /// ``` library; diff --git a/packages/syntax_noir/pubspec.yaml b/packages/syntax_noir/pubspec.yaml index 8016a4b..6b53e99 100644 --- a/packages/syntax_noir/pubspec.yaml +++ b/packages/syntax_noir/pubspec.yaml @@ -19,7 +19,7 @@ platforms: windows: dependencies: noir: ^0.0.4 - syntax: ^0.0.1 + syntax_core: ^0.0.1 dev_dependencies: lints: ^6.0.0 # Exact, while it is an alpha. diff --git a/packages/syntax_noir/pubspec_overrides.yaml b/packages/syntax_noir/pubspec_overrides.yaml index 7c28367..39cc455 100644 --- a/packages/syntax_noir/pubspec_overrides.yaml +++ b/packages/syntax_noir/pubspec_overrides.yaml @@ -1,5 +1,5 @@ # Local pin for this checkout and CI. .pubignore keeps it out of the -# published archive. The published package depends on hosted syntax. +# published archive. The published package depends on hosted syntax_core. dependency_overrides: - syntax: - path: ../syntax + syntax_core: + path: ../syntax_core diff --git a/packages/syntax_noir/test/code_highlighter_test.dart b/packages/syntax_noir/test/code_highlighter_test.dart index 386f07e..f0848c3 100644 --- a/packages/syntax_noir/test/code_highlighter_test.dart +++ b/packages/syntax_noir/test/code_highlighter_test.dart @@ -1,7 +1,7 @@ import 'package:noir/noir.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart' as syntax; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart' as syntax; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:syntax_noir/syntax_noir.dart'; import 'package:test/test.dart'; diff --git a/packages/syntax_noir/test/colors_test.dart b/packages/syntax_noir/test/colors_test.dart index c36d9cf..5522e3e 100644 --- a/packages/syntax_noir/test/colors_test.dart +++ b/packages/syntax_noir/test/colors_test.dart @@ -1,5 +1,5 @@ import 'package:noir/noir.dart'; -import 'package:syntax/syntax.dart' as syntax; +import 'package:syntax_core/syntax.dart' as syntax; import 'package:syntax_noir/syntax_noir.dart'; import 'package:test/test.dart'; diff --git a/packages/syntax_noir/test/driver/patch_app.dart b/packages/syntax_noir/test/driver/patch_app.dart index 29da852..f141252 100644 --- a/packages/syntax_noir/test/driver/patch_app.dart +++ b/packages/syntax_noir/test/driver/patch_app.dart @@ -1,7 +1,7 @@ import 'package:noir/noir.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart' as syntax; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart' as syntax; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:syntax_noir/syntax_noir.dart'; /// The app the driver tests launch: twenty lines with `v10` changed, side diff --git a/packages/syntax_noir/test/driver/patch_view_driver_test.dart b/packages/syntax_noir/test/driver/patch_view_driver_test.dart index d47392d..5a2bdf2 100644 --- a/packages/syntax_noir/test/driver/patch_view_driver_test.dart +++ b/packages/syntax_noir/test/driver/patch_view_driver_test.dart @@ -4,8 +4,8 @@ library; import 'package:noir_driver/noir_driver.dart'; -import 'package:syntax/syntax.dart' as syntax; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/syntax.dart' as syntax; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:test/test.dart'; Future launch({List arguments = const []}) async { diff --git a/packages/syntax_noir/test/patch_painter_test.dart b/packages/syntax_noir/test/patch_painter_test.dart index 7611847..b9b4711 100644 --- a/packages/syntax_noir/test/patch_painter_test.dart +++ b/packages/syntax_noir/test/patch_painter_test.dart @@ -1,7 +1,7 @@ import 'package:noir/noir.dart'; -import 'package:syntax/langs/dart.dart'; -import 'package:syntax/syntax.dart' as syntax; -import 'package:syntax/themes/github_dark.dart'; +import 'package:syntax_core/langs/dart.dart'; +import 'package:syntax_core/syntax.dart' as syntax; +import 'package:syntax_core/themes/github_dark.dart'; import 'package:syntax_noir/syntax_noir.dart'; import 'package:test/test.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 7b85db6..225a14e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ publish_to: none environment: sdk: ^3.9.0 workspace: - - packages/syntax + - packages/syntax_core - packages/syntax_flutter dev_dependencies: lints: ^6.0.0 diff --git a/tool/README.md b/tool/README.md index 825f8ae..6847ba9 100644 --- a/tool/README.md +++ b/tool/README.md @@ -1,7 +1,7 @@ # tool Node scripts that build and check the bundled grammars and themes in -`packages/syntax`. Install the pinned versions first: +`packages/syntax_core`. Install the pinned versions first: ```bash npm ci @@ -12,8 +12,8 @@ npm ci | `npm run generate` | Writes `lib/langs`, `lib/themes` and `NOTICE` from `tm-grammars` and `tm-themes`. The languages and themes are listed in `bundle.mjs`. | | `npm run samples` | Downloads the upstream sample for each bundled language into `test/fixtures/samples`, except the ones written for this repository. | | `npm run golden` | Records Shiki's tokens and colors for each sample into `test/fixtures/golden`. | -| `npm run bench -- ` | Measures Shiki on a file, for comparison with `packages/syntax/benchmark`. | -| `node stress.mjs ` | Records Shiki's tokens for every grammar that has a sample, for `packages/syntax/tool/stress.dart`. | +| `npm run bench -- ` | Measures Shiki on a file, for comparison with `packages/syntax_core/benchmark`. | +| `node stress.mjs ` | Records Shiki's tokens for every grammar that has a sample, for `packages/syntax_core/tool/stress.dart`. | The versions of `shiki`, `tm-grammars` and `tm-themes` are exact in `package.json`, so regenerating gives the same files. CI checks this. diff --git a/tool/generate.mjs b/tool/generate.mjs index ed3a590..3a88ff3 100644 --- a/tool/generate.mjs +++ b/tool/generate.mjs @@ -1,4 +1,4 @@ -// Generates packages/syntax/lib/langs/*.dart and lib/themes/*.dart from the +// Generates packages/syntax_core/lib/langs/*.dart and lib/themes/*.dart from the // tm-grammars and tm-themes npm packages (the same data Shiki ships). // // Each grammar and theme becomes a `const` Dart value in its own library, @@ -73,7 +73,7 @@ function writeLangs() { fs.writeFileSync( path.join(dir, file), header(meta.source, meta.license) + - `import 'package:syntax/syntax.dart' show Language;\n\n` + + `import 'package:syntax_core/syntax.dart' show Language;\n\n` + `/// ${meta.displayName} (\`${meta.scopeName}\`).\n` + `const ${id} = Language(\n` + ` name: ${dartString(name)},\n` + @@ -104,7 +104,7 @@ function writeThemes() { fs.writeFileSync( path.join(dir, file), header(meta.source, meta.license) + - `import 'package:syntax/syntax.dart' show SyntaxTheme;\n\n` + + `import 'package:syntax_core/syntax.dart' show SyntaxTheme;\n\n` + `/// ${meta.displayName}.\n` + `const ${id} = SyntaxTheme(\n` + ` name: ${dartString(name)},\n` + @@ -122,7 +122,7 @@ function writeIndex(dir, type, listName, exports) { '//', '// Importing this library pulls in every bundled entry. Import', '// individual files instead to keep app size down.', - `import 'package:syntax/syntax.dart' show ${type};`, + `import 'package:syntax_core/syntax.dart' show ${type};`, '', ...exports.map(({ file }) => `import '${file}';`), '', diff --git a/tool/golden.mjs b/tool/golden.mjs index 2a7b0a5..00201ed 100644 --- a/tool/golden.mjs +++ b/tool/golden.mjs @@ -1,6 +1,6 @@ // Records what Shiki (vscode-textmate + Oniguruma WASM) produces for every // sample: raw scopes per token, and colors per token for a few themes. -// packages/syntax/test/conformance_test.dart compares syntax against these. +// packages/syntax_core/test/conformance_test.dart compares syntax against these. import fs from 'node:fs' import path from 'node:path' diff --git a/tool/package.json b/tool/package.json index ba0d71f..28c4068 100644 --- a/tool/package.json +++ b/tool/package.json @@ -2,7 +2,7 @@ "name": "syntax-tool", "private": true, "type": "module", - "description": "Pulls TextMate grammars/themes into packages/syntax and records Shiki's output as the conformance oracle.", + "description": "Pulls TextMate grammars/themes into packages/syntax_core and records Shiki's output as the conformance oracle.", "scripts": { "generate": "node generate.mjs", "samples": "node samples.mjs", diff --git a/tool/stress.mjs b/tool/stress.mjs index 74c6045..62df771 100644 --- a/tool/stress.mjs +++ b/tool/stress.mjs @@ -1,6 +1,6 @@ // Stress test: records Shiki's scopes for every grammar in tm-grammars, // using the upstream sample for each. Usage: node stress.mjs -// Then, from packages/syntax: +// Then, from packages/syntax_core: // dart run tool/stress.dart ../../tool/node_modules/tm-grammars/grammars import fs from 'node:fs' import path from 'node:path'