Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
fdb2b48
chore: add trashfiles to ignore
theodevelop Apr 13, 2026
d061a01
fix: correct #line offset and unquoted filename detection in Show in …
theodevelop Apr 13, 2026
22efb87
Merge pull request #44 from theodevelop/fix/show-in-source
theodevelop Apr 13, 2026
1b85395
lookup for generated files: support file names used by automake
GitMensch Apr 16, 2026
42f41a4
allow CI to be run manually on all branches
GitMensch Apr 16, 2026
48a57d2
Update lineDirectiveNavigation.ts
GitMensch Apr 16, 2026
9acf2e4
Update lineDirectiveNavigation.ts
GitMensch Apr 16, 2026
4461482
chore: consolidate CI workflows and add full test suite
theodevelop Apr 17, 2026
5aa2955
test: fix missing diagnostic code in getCodeActions test
theodevelop Apr 17, 2026
59b40ce
Merge pull request #47 from theodevelop/chore/ci-workflow
theodevelop Apr 17, 2026
daa7480
Merge branch 'dev' into patch-1
theodevelop Apr 17, 2026
670fb74
Merge pull request #45 from GitMensch/patch-1
theodevelop Apr 17, 2026
6fe1760
feat: add Bison/Flex Navigation output channel for Show in Generated
theodevelop Apr 18, 2026
bbb8944
fix: cache generated file lookup and document multi-root workspace be…
theodevelop Apr 19, 2026
28d1f2d
docs: document buildDirectory configuration in README
theodevelop Apr 20, 2026
20effd8
Merge pull request #48 from theodevelop/fix/issue-27
theodevelop Apr 20, 2026
4a242ed
chore: bump version to 1.5.3
theodevelop Apr 20, 2026
680487a
docs: add v1.5.3 changelog entry and document buildDirectory in README
theodevelop Apr 20, 2026
8a5b1a6
Merge branch 'main' into dev
theodevelop Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
# manual run in actions tab - for all branches
workflow_dispatch:

jobs:
build-and-test:
Expand All @@ -25,9 +27,24 @@ jobs:
- name: Compile
run: npm run compile

- name: Run parser tests
- name: Test — parsers
run: npx ts-node --project server/tsconfig.json tests/test-parsers.ts

- name: Test — diagnostic codes
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-diagnostic-codes.ts

- name: Test — version settings
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-version-settings.ts

- name: Test — fix-it hints (code actions)
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-fix-it-hints.ts

- name: Test — line directive utils
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-line-directive.ts

- name: Test — new providers
run: TS_NODE_PROJECT=tsconfig.base.json npx ts-node tests/test-new-providers.ts

- name: Package VSIX
run: npx vsce package --no-dependencies -o extension.vsix

Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/publish-ovsx.yml

This file was deleted.

38 changes: 33 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ on:
- "v*"

jobs:
package:
release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Verify tag is on main
run: |
git fetch origin main
if ! git merge-base --is-ancestor HEAD origin/main; then
echo "❌ Release tags must be created from the main branch."
exit 1
fi

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -24,12 +34,30 @@ jobs:
run: npm ci

- name: Build VSIX
run: |
npm run package
npx vsce package
run: npx vsce package

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: "*.vsix"
generate_release_notes: true
generate_release_notes: true

- name: Publish to Open VSX
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: |
if [ -z "$OVSX_PAT" ]; then
echo "⚠️ OVSX_PAT not set — skipping Open VSX publish"
else
npx ovsx publish *.vsix --pat "$OVSX_PAT"
fi

- name: Publish to VS Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
if [ -z "$VSCE_PAT" ]; then
echo "⚠️ VSCE_PAT not set — skipping VS Marketplace publish"
else
npx vsce publish --pat "$VSCE_PAT"
fi
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ server/out/
.env
tests/_*
docs/
.vscode/
.vscode/
.claude/
graphify-out/
tests/manuals/
.vscode/launch.json
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ package-lock.json
.env
.env.*
docs/
graphify-out/
tests/manuals/
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to the **Bison/Flex Language Support** extension will be documented in this file.

## [1.5.3] - 2026-04-20

### Added

- **Show in Generated File — output channel** (#27): a dedicated *Bison/Flex Navigation* output channel now logs every directory and file path searched when locating the generated file. The channel is shown automatically when the search starts, making it easy to diagnose `buildDirectory` misconfigurations.
- **Show in Generated File — automake file names** (#45, contributed by [@GitMensch](https://github.com/GitMensch)): the generated-file search now also looks for the automake-style names used when Bison/Flex is called from an automake rule (`.tab.c`/`.tab.h`, `_tab.c`/`_tab.h`, `lex.yy.c`, `lex._.c`, and their `.cc`/`.cpp` variants).

### Fixed

- **Show in Source — `#line` offset and unquoted filenames** (#44): the command now correctly handles `#line` directives without quoted filenames (e.g. `#line 42 parser.y` in addition to `#line 42 "parser.y"`), and the line offset is now computed correctly so the editor opens at the exact grammar line.
- **Show in Generated File — cached lookup / multi-root workspaces** (#27): the last successfully found generated file is cached per source file, avoiding redundant filesystem scans on repeated calls. In multi-root workspaces `${workspaceFolder}` in `bisonFlex.buildDirectory` now resolves to the workspace folder that contains the source file, so a single setting works correctly across all roots.

### Documentation

- `bisonFlex.buildDirectory` is now documented in the README with supported formats (`${workspaceFolder}`, relative paths, absolute paths) and multi-root workspace behaviour.

### CI / Internal

- Workflows consolidated: CI now runs on `push`/`pull_request` for both `main` and `dev`; the VSIX artifact is built on every CI run.

---

## [1.5.2] - 2026-04-05

### Added
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ Jump between Bison/Flex grammar sources and their generated C files using `#line
- **Bison/Flex: Show in Source** — from a generated `.tab.c` / `lex.yy.c` file, reads the nearest `#line N "file.y"` directive above the cursor and opens the grammar source at the correct line. Appears in the context menu only when a generated file is detected.
- **Bison/Flex: Show in Generated File** — from a `.y` / `.l` source, locates the generated file and navigates to the matching line. Searches `bisonFlex.buildDirectory`, then CMake/Makefile detection, then the same directory, then a workspace-wide scan. A QuickPick is shown when multiple candidates are found.

#### Configuring `bisonFlex.buildDirectory`

Set this to the directory where Bison/Flex writes its generated files when they are not placed next to the source:

- **`${workspaceFolder}`** — resolved to the workspace folder that contains the source file. In multi-root workspaces each folder resolves independently, so a single setting works across all roots.
- **Relative path** — resolved relative to that same workspace folder (e.g. `build` or `cmake-build-debug/parser`).
- **Absolute path** — used as-is.

If the setting is empty or the generated file is not found there, the extension falls back to CMake/Makefile-detected paths, then the source file's own directory, then a workspace-wide scan.

### Autocompletion

Context-aware suggestions triggered as you type:
Expand Down Expand Up @@ -226,7 +236,7 @@ Then press `F5` in VS Code to launch the Extension Development Host.
| `bisonFlex.minVersionBison` | `string` | `""` | Suppress checks that require a newer Bison version (e.g. `"3.0"`). Fires `bison/feature-requires-version` when a `%define` feature exceeds this version. |
| `bisonFlex.minVersionFlex` | `string` | `""` | Same as above for Flex. |
| `bisonFlex.disabledChecks` | `array` | `[]` | Diagnostic code slugs to suppress entirely (e.g. `["bison/shift-reduce", "flex/missing-yywrap"]`). |
| `bisonFlex.buildDirectory` | `string` | `""` | Path to the build output directory. Used by **Show in Generated File** to locate `.tab.c` / `lex.yy.c` when they are not next to the source. |
| `bisonFlex.buildDirectory` | `string` | `""` | Directory where Bison/Flex writes its generated files (`.tab.c`, `lex.yy.c`). Supports `${workspaceFolder}` (resolved per workspace root in multi-root setups), paths relative to that root, and absolute paths. See [Configuring `bisonFlex.buildDirectory`](#configuring-bisonflexbuilddirectory) for details. |

---

Expand Down
Loading
Loading