diff options
| author | 2026-10-14 15:42:33 +0330 | |
|---|---|---|
| committer | 2026-10-14 15:42:33 +0330 | |
| commit | bb4643ce2384513fa65b7783a015d751f2ca2e12 (patch) | |
| tree | 02d2470d7996f074475ccd553d1cbf471527b684 /src/tools/xref.sh | |
| parent | todo: record each agent's state at the end of the session and the merge order (diff) | |
| parent | xref: checked-in baseline, --check self-test hooked into the lsp section, todo (diff) | |
merge xref report: baseline, --check, self-test
Diffstat (limited to 'src/tools/xref.sh')
| -rwxr-xr-x | src/tools/xref.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/xref.sh b/src/tools/xref.sh new file mode 100755 index 0000000..b014dae --- /dev/null +++ b/src/tools/xref.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# cross-reference of the compiler's global state: who writes each global, who only reads it. +# a shell wrapper around src/tools/xref.js (node). run `src/tools/xref.sh --help` for the options. +# needs build/bin/zclsp (make): exact scoping comes from the language server's references. +set -e +here=$(cd "$(dirname "$0")" && pwd) +if ! command -v node >/dev/null 2>&1; then + case "$1" in + --help|-h) + echo "usage: src/tools/xref.sh [--check|--update] [--server PATH] [--compiler-dir DIR] [--baseline FILE] [--out DIR] [--jobs N]" + echo "(node is required to run it)" + exit 0 ;; + esac + echo "xref: node is required" >&2 + exit 3 +fi +exec node "$here/xref.js" "$@" |
