rparsec2 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,25 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RParsec
2
4
 
3
- class ParserMonad
4
- def fail msg
5
- FailureParser.new(msg)
6
- end
5
+ class ParserMonad # :nodoc:
6
+ def fail msg
7
+ FailureParser.new(msg)
8
+ end
7
9
 
8
- def value v
9
- return Nil if v.nil?
10
- ValueParser.new(v);
11
- end
10
+ def value v
11
+ return Nil if v.nil?
12
+ ValueParser.new(v);
13
+ end
12
14
 
13
- def bind(v, &proc)
14
- return v unless proc
15
- BoundParser.new(v, proc);
16
- end
15
+ def bind(v, &proc)
16
+ return v unless proc
17
+ BoundParser.new(v, proc);
18
+ end
17
19
 
18
- def mplus(p1, p2)
19
- PlusParser.new([p1, p2]);
20
+ def mplus(p1, p2)
21
+ PlusParser.new([p1, p2]);
22
+ end
20
23
  end
21
- end
22
24
 
23
- end # module
25
+ end # module