Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove tabs from grammar doc
  • Loading branch information
MorayJ committed Oct 22, 2018
1 parent f273384 commit aa36ae4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions doc/Language/grammars.pod6
Expand Up @@ -439,16 +439,16 @@ Once the arguments are passed in, they can be used in a call to a named regex in
=begin code
grammar demonstrate-arguments-again
rule TOP ($word) {
<phrase-stem><added-word($word)>
<phrase-stem><added-word($word)>
}
rule phrase-stem {
"I like"
}
"I like"
}
rule added-word($passed-word) {
$passed-word
}
}
}
say demonstrate-arguments-again.parse("I like vegetables", :args(("vegetables",)));
Expand All @@ -463,13 +463,13 @@ Alternatively, you can initialise dynamic variables and use any arguments that w
grammar demonstrate-arguments-dynamic {
rule TOP ($*word, $*extra) {
<phrase-stem><added-words>
}
}
rule phrase-stem {
"I like"
}
"I like"
}
rule added-words {
$*word $*extra
}
$*word $*extra
}
}
say demonstrate-arguments-dynamic.parse("I like everything else", :args(("everything", "else")));
Expand Down

0 comments on commit aa36ae4

Please sign in to comment.