debug: worddesc show more information

This seems appropriate since worddescs are getting more and more complex:
markers, flags, tokentypes, ...
This commit is contained in:
Khaïs COLIN 2025-04-09 15:38:13 +02:00
parent 6576c47b56
commit 4d6a64bf6a
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
9 changed files with 83 additions and 25 deletions

26
test.sh
View file

@ -579,8 +579,32 @@ hello hi
EOF
when_run <<EOF "quoted parentheses are not operators"
.debug
.exec
echo unclosed '('
EOF
todo
expecting <<EOF
[dbg: 1]
[exec: 0]
╰─ t_simple_cmd
├─ line = 0
├─ t_wordlist
│ ├─ t_worddesc
│ │ ├─ word = [echo]
│ │ ├─ marker = [ ]
│ │ ├─ flags = 0
│ │ ╰─ t_token_type = WORD_TOKEN
│ ├─ t_worddesc
│ │ ├─ word = [unclosed]
│ │ ├─ marker = [ ]
│ │ ├─ flags = 0
│ │ ╰─ t_token_type = WORD_TOKEN
│ ╰─ t_worddesc
│ ├─ word = ['(']
│ ├─ marker = [ ' ]
│ ├─ flags = 2
│ ╰─ t_token_type = WORD_TOKEN
╰─ redirections = (empty redir list)
EOF
finalize