Skip to content

Commit

Permalink
Add DOT short name for full stop
Browse files Browse the repository at this point in the history
  • Loading branch information
gilch committed Oct 30, 2024
1 parent 058dc75 commit 07d84fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/lissp_whirlwind_tour.rst
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,8 @@ Lissp Whirlwind Tour
'QzDIGITxFOUR_2'

#> '\.
>>> 'QzFULLxSTOP_'
'QzFULLxSTOP_'
>>> 'QzDOT_'
'QzDOT_'

#> '\\
>>> 'QzBSOL_'
Expand Down
2 changes: 1 addition & 1 deletion src/hissp/munger.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _munge_part(part):
"+": "PLUS",
# COMMA is fine.
"-": "H", # Hyphen-minus
# Full stop reserved for imports and attributes.
".": "DOT", # Doesn't munge by default.
"/": "SOL",
# Digits only munge if first character.
# COLON is fine.
Expand Down
6 changes: 3 additions & 3 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def test_reader_missing(self):
next(self.reader.reads("(x#)"))

def test_reader_initial_dot(self):
msg = r"unknown tag 'QzFULLxSTOP_foo'"
msg = r"unknown tag 'QzDOT_foo'"
with self.assertRaisesRegex(SyntaxError, msg):
next(self.reader.reads(".foo# 0"))

Expand Down Expand Up @@ -289,7 +289,7 @@ def test_tag_under_arity(self):
("quote",
"QzTILDE_QzBANG_QzAT_QzHASH_QzDOLR_QzPCENT_QzHAT_QzET_QzSTAR_QzLPAR_QzRPAR__"
"QzPLUS_QzLCUB_QzRCUB_QzVERT_QzCOLON_QzQUOT_QzLT_QzGT_QzQUERY_QzGRAVE_QzH_QzEQ_"
"QzLSQB_QzRSQB_QzBSOL_QzSEMI_QzAPOS_QzCOMMA_QzFULLxSTOP_QzSOL_",)
"QzLSQB_QzRSQB_QzBSOL_QzSEMI_QzAPOS_QzCOMMA_QzDOT_QzSOL_",)
],

R"""\1 \12 \[] \(\) \{} \[] \: \; \# \` \, \' \" \\ \\. \. \ """: [
Expand All @@ -308,7 +308,7 @@ def test_tag_under_arity(self):
"QzQUOT_",
"QzBSOL_",
'QzBSOL_.',
'QzFULLxSTOP_',
'QzDOT_',
"QzSPACE_",
],

Expand Down

0 comments on commit 07d84fb

Please sign in to comment.