nff: add parsing and CST inspection commands

This commit is contained in:
raf 2025-06-02 15:24:18 +03:00
commit 13245c08fe
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 161 additions and 5 deletions

View file

@ -94,6 +94,25 @@ nff lint config.nft --style-warnings=false --best-practices=false
nff lint config.nft --debug
```
### Parsing and CST Inspection
```bash
# Parse and display CST structure for debugging
nff parse /etc/nftables.conf
# Show tree structure with indentation
nff parse config.nft --tree
# Show detailed node information
nff parse config.nft --verbose
# Combined tree and verbose output
nff parse config.nft --tree --verbose
# Debug output with tokens and CST validation
nff parse config.nft --debug
```
## Architecture
### Processing Pipeline