From f5e55cbbdbe177f5174112f811af20bd76150b6f Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 22 Jun 2021 21:57:47 -0700 Subject: . --- shell/infix.mu | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'shell/infix.mu') diff --git a/shell/infix.mu b/shell/infix.mu index a0e81ff2..e7982d0e 100644 --- a/shell/infix.mu +++ b/shell/infix.mu @@ -247,6 +247,8 @@ fn test-infix { check-infix "abc", "abc", "F - test-infix/regular-symbol" check-infix "-3", "-3", "F - test-infix/negative-integer-literal" check-infix "[a b+c]", "[a b+c]", "F - test-infix/string-literal" + check-infix "$", "$", "F - test-infix/dollar-sym" + check-infix "$$", "$$", "F - test-infix/dollar-sym-2" check-infix "$a", "$a", "F - test-infix/dollar-var" check-infix "$+", "$+", "F - test-infix/dollar-operator" check-infix "(+)", "+", "F - test-infix/operator-without-args" @@ -316,19 +318,9 @@ fn operator-symbol? _x: (addr cell) -> _/eax: boolean { return result } -fn non-operator-grapheme? g: grapheme -> _/eax: boolean { - var operator?/eax: boolean <- operator-grapheme? g - compare operator?, 0/false - { - break-if-= - return 0/false - } - return 1/true -} - # just a short list of operator graphemes for now fn operator-grapheme? g: grapheme -> _/eax: boolean { - # '$' is special and can be in either a symbol or operator + # '$' is special and can be in either a symbol or operator; here we treat it as a symbol compare g, 0x25/percent { break-if-!= -- cgit 1.4.1-2-gfad0