We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70dea64 commit 150ef59Copy full SHA for 150ef59
1 file changed
README.md
@@ -43,21 +43,27 @@ require 'code_breaker'
43
44
code_snippet = 'crazy_number = Rational(3, 5) + 42 - Complex(2.3, 6.4) * 1.2'
45
CodeBreaker.parse(code_snippet)
46
-# => [Rational, :+, Fixnum, :-, Complex, :*, Float]
+# => [:crazy_number, :'=', Rational, :+, Fixnum, :-, Complex, :*, Float]
47
+
48
+code_snippet = '"hello" + "World"'
49
+CodeBreaker.parse(code_snippet)
50
+# => [String, :+, String]
51
```
52
53
You can also use the Parser class directly:
54
55
```ruby
56
57
58
parser = CodeBreaker::Parser.new(code_snippet)
59
parser.run
-
-parser.input
-# => 'crazy_number = Rational(3, 5) + 42 - Complex(2.3, 6.4) * 1.2'
60
61
62
parser.output
63
64
65
+parser.input
66
+# => "\"hello\"+\"world\""
67
68
69
## Development
0 commit comments