From 480754b38ecd2b1952d440cff8f9d959ac714a28 Mon Sep 17 00:00:00 2001 From: d6 Date: Tue, 21 Dec 2021 01:30:22 -0500 Subject: [PATCH] fix comment syntax --HG-- branch : pmacs2 --- mode/tal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/tal.py b/mode/tal.py index 3a93034..213ec68 100644 --- a/mode/tal.py +++ b/mode/tal.py @@ -6,7 +6,7 @@ import re class TalGrammar(Grammar): rules = [ PatternRule('spaces', '[ \t]+'), - RegionRule('comment', r'\(', Grammar, '\)'), + RegionRule('comment', r'\((?:[ \t]|$)', Grammar, '(?:^|[ \t])\)'), PatternRule('delimiter', r'[\[\]{}]'), PatternRule('tal.inst', r'(BRK|LIT|INC|POP|DUP|NIP|SWP|OVR|ROT|EQU|NEQ|GTH|LTH|JMP|JCN|JSR|STH|LDZ|STZ|LDR|STR|LDA|STA|DEI|DEO|ADD|SUB|MUL|DIV|AND|ORA|EOR|SFT)2?k?r?'), # instructions PatternRule('tal.defmacro', r'%[^ \t\n]+'), # macro-define