aboutsummaryrefslogtreecommitdiff
path: root/parser.d
diff options
context:
space:
mode:
authormryouse2023-05-28 02:13:40 +0000
committermryouse2023-05-28 02:13:40 +0000
commit15e2e506687f6e914095f2194c545204b49e3d98 (patch)
treea0976d4a1ebb56e4d74637dd7bf4a59f71e2ad13 /parser.d
parent919994fd3224b6e3cb3e1ce534ae335cecd97f52 (diff)
skip comments (mostly)
Diffstat (limited to 'parser.d')
-rw-r--r--parser.d7
1 files changed, 7 insertions, 0 deletions
diff --git a/parser.d b/parser.d
index f05d8fc..43c7faa 100644
--- a/parser.d
+++ b/parser.d
@@ -499,6 +499,7 @@ class Parser {
char next;
while(peekable()) {
+ skipWhitespace();
next = peek();
if (next == ')') {
break;
@@ -534,6 +535,7 @@ class Parser {
char next;
while(peekable()) {
+ skipWhitespace();
next = peek();
if (next == ')') {
break;
@@ -700,6 +702,11 @@ class Parser {
case '(':
advance(); // go past the open paren
return parseCons();
+ case ';':
+ while (peekable() && peek() != '\n') {
+ advance();
+ }
+ return parseForm();
case ':':
// skipping types for now, so consume/print/throw away
char[] typ;