rpl comments with @
This commit is contained in:
parent
2a005112be
commit
3747453aef
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue