From 882aa867ebe213f04d3c41e415648c56f912f250 Mon Sep 17 00:00:00 2001 From: skewb1k Date: Mon, 24 Nov 2025 22:41:04 +0300 Subject: [PATCH] docs: remove manual bindings update steps for scanner Since 66dab20462fcaf2b7ffe77a46af16419a1aded2a, bindings automatically detect external scanner, making the instructions for manual updating outdated. Avoids confusion about missing commented lines in Rust bindings. --- docs/src/creating-parsers/4-external-scanners.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/src/creating-parsers/4-external-scanners.md b/docs/src/creating-parsers/4-external-scanners.md index 7d63d04b..05268df7 100644 --- a/docs/src/creating-parsers/4-external-scanners.md +++ b/docs/src/creating-parsers/4-external-scanners.md @@ -23,10 +23,7 @@ grammar({ }); ``` -Then, add another C source file to your project. Its path must be src/scanner.c for the CLI to recognize it. Be sure to add -this file to the sources section of your `binding.gyp` file so that it will be included when your project is compiled by -Node.js and uncomment the appropriate block in your bindings/rust/build.rs file so that it will be included in your Rust -crate. +Then, add another C source file to your project. Its path must be src/scanner.c for the CLI to recognize it. In this new source file, define an [`enum`][enum] type containing the names of all of your external tokens. The ordering of this enum must match the order in your grammar's `externals` array; the actual names do not matter.