Skip to content

Commit

Permalink
fix: simple example multiline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
igordejanovic committed Feb 10, 2024
1 parent b6dbee4 commit 7d6a334
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions examples/simple/program.simple
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* An example
of a simple C-like language
*/
function fak(n) {
if (n==0) {
// For 0! result is 0
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from arpeggio import RegExMatch as _

# Grammar
def comment(): return [_(r"//.*"), _(r"/\*.*\*/")]
def comment(): return [_(r"//.*"), _(r"(?s)/\*.*?\*/")]
def literal(): return _(r'\d*\.\d*|\d+|".*?"')
def symbol(): return _(r"\w+")
def operator(): return _(r"\+|\-|\*|\/|\=\=")
Expand Down

0 comments on commit 7d6a334

Please sign in to comment.