File tree Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ type Parser {
5555
5656 if c == "[" {
5757 bracket_stack.push(i)
58- } else if c == "]" && !bracket_stack.is_empty?() {
58+ } else if c == "]" and !bracket_stack.is_empty?() {
5959 let left = bracket_stack.pop()
6060 let right = i
6161 bracket_map[left] = right
@@ -128,7 +128,7 @@ fn help {
128128}
129129
130130fn parse_options {
131- let option = argv()[0] || help()
131+ let option = argv()[0] or help()
132132
133133 if "--hello-world".includes?(option) {
134134 "
@@ -159,9 +159,9 @@ fn parse_options {
159159 http://www.hevanet.com/cristofd/brainfuck/]
160160
161161 "
162- } else if "--file".includes?(option) && argv()[1] {
162+ } else if "--file".includes?(option) and argv()[1] {
163163 open(argv()[1])
164- } else if "--eval".includes?(option) && argv()[1] {
164+ } else if "--eval".includes?(option) and argv()[1] {
165165 argv()[1]
166166 } else {
167167 help()
Original file line number Diff line number Diff line change @@ -21,23 +21,23 @@ type Vector2D {
2121 }
2222
2323 eq { |other|
24- return self.x == other.x && self.y == other.y
24+ return self.x == other.x and self.y == other.y
2525 }
2626
2727 lt { |other|
28- return self.x < other.x || (self.x == other.x && self.y < other.y)
28+ return self.x < other.x or (self.x == other.x and self.y < other.y)
2929 }
3030
3131 lte { |other|
32- return self.x < other.x || (self.x == other.x && self.y <= other.y)
32+ return self.x < other.x or (self.x == other.x and self.y <= other.y)
3333 }
3434
3535 gt { |other|
36- return self.x > other.x || (self.x == other.x && self.y > other.y)
36+ return self.x > other.x or (self.x == other.x and self.y > other.y)
3737 }
3838
3939 gte { |other|
40- return self.x > other.x || (self.x == other.x && self.y >= other.y)
40+ return self.x > other.x or (self.x == other.x and self.y >= other.y)
4141 }
4242
4343 mod { |other|
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ println(
4444var e = 0
4545println(
4646 inspect(while e < 3 {
47- if e == 0 || e == 2 {
47+ if e == 0 or e == 2 {
4848 e += 1
4949 next # next returns nil
5050 }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ println('a\nstring') # expect: a\nstring
1010println("A~¶Þॐஃ") # expect: A~¶Þॐஃ
1111
1212# symbol strings
13- println(:hey == 'hey' && :hey == "hey") # expect: true
13+ println(:hey == 'hey' and :hey == "hey") # expect: true
1414println(:hey) # expect: hey
1515println(:123) # expect: 123
1616println(:1a2b3c) # expect: 1a2b3c
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ type TestRunner {
2222 self.tests.each(fn { |t|
2323 let result = t[:block](Should())
2424
25- if result && result[:ok] == false {
25+ if result and result[:ok] == false {
2626 print("F")
2727 failed_tests.push({ name: "{self.current_group} {t[:name]}", message: result[:message] })
2828 } else {
You can’t perform that action at this time.
0 commit comments