rpl comments with @

This commit is contained in:
Gwenhael Le Moine 2022-03-12 22:20:30 +01:00
parent 2a005112be
commit 3747453aef
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ class Parser
unless input.index("\n").nil?
input = input.split("\n")
.map do |line|
comment_begin_index = line.index('#')
comment_begin_index = line.index('@')
case comment_begin_index
when nil

View file

@ -311,11 +311,11 @@ dup * »
end
def test_with_comments
result = Parser.parse( "« 2 #deux
# on duplique le deux
result = Parser.parse( "« 2 @deux
@ on duplique le deux
dup * »
# on va STOcker ce programme dans la variable 'carré'
@ on va STOcker ce programme dans la variable 'carré'
'carré' sto" )
assert_equal 3, result.size
assert_equal RplProgram, result.first.class