From b89c158e3e2f24cbc6b3f0ebe71d9206e529fcaa Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 28 Feb 2021 13:06:11 -0800 Subject: 7823 --- baremetal/shell/parse.mu | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'baremetal/shell') diff --git a/baremetal/shell/parse.mu b/baremetal/shell/parse.mu index 7c36673f..c89f8f0d 100644 --- a/baremetal/shell/parse.mu +++ b/baremetal/shell/parse.mu @@ -4,15 +4,19 @@ fn parse-sexpression tokens: (addr stream cell), _out: (addr handle cell), trace rewind-stream tokens var curr-token-storage: cell var curr-token/ecx: (addr cell) <- address curr-token-storage + var empty?/eax: boolean <- stream-empty? tokens + compare empty?, 0/false { - var done?/eax: boolean <- stream-empty? tokens - compare done?, 0/false - break-if-!= - read-from-stream tokens, curr-token - parse-atom curr-token, _out, trace + break-if-= + error trace, "nothing to parse" return } - abort "unexpected tokens at end; only type in a single expression at a time" + read-from-stream tokens, curr-token + parse-atom curr-token, _out, trace + var empty?/eax: boolean <- stream-empty? tokens + compare empty?, 0/false + break-if-!= + error trace, "unexpected tokens at end; only type in a single expression at a time" } fn parse-atom _curr-token: (addr cell), _out: (addr handle cell), trace: (addr trace) { -- cgit 1.4.1-2-gfad0 /ext/keybinding_parser.py?h=v1.9.2&id=7c9e8e286e6bfe939fa492429144da56ab75cd03'>blame commit diff stats
path: root/ranger/ext/keybinding_parser.py
blob: 4e590283e198d8cf88aaec0087daca49d228ed16 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15