halunke 0.10.0 → 0.10.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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.woodpecker/test.yml +9 -0
- data/Dockerfile +6 -6
- data/Gemfile +11 -1
- data/Gemfile.lock +73 -12
- data/README.md +1 -1
- data/Rakefile +6 -1
- data/docs/Gemfile +1 -0
- data/docs/Gemfile.lock +176 -164
- data/docs/_layouts/default.html +1 -19
- data/docs/index.md +1 -1
- data/docs/stdio.md +1 -1
- data/docs/web.md +1 -1
- data/exe/halunke +8 -3
- data/halunke.gemspec +3 -7
- data/lib/halunke/parser.rb +666 -18
- data/lib/halunke/runtime/hregexp.rb +1 -1
- data/lib/halunke/runtime/hweb.rb +6 -6
- data/lib/halunke/tokenizer.rb +8 -9
- data/lib/halunke/tokenizer.rl +1 -2
- data/lib/halunke/version.rb +1 -1
- metadata +20 -64
- data/.travis.yml +0 -5
data/docs/index.md
CHANGED
|
@@ -87,7 +87,7 @@ with a value, and it will assign it. Be aware that you can't reassign. So if
|
|
|
87
87
|
you assign something to a once, it will stay like this forever (within that
|
|
88
88
|
scope). Reassigning will result in an error. *There will be reassignable
|
|
89
89
|
references in the future, see [the issue for
|
|
90
|
-
details](https://
|
|
90
|
+
details](https://codeberg.org/moonglum/halunke/issues/3)*
|
|
91
91
|
|
|
92
92
|
The values are also immutable. If you send a message to an object,
|
|
93
93
|
it will not change the object, but it will return an answer to you.
|
data/docs/stdio.md
CHANGED
|
@@ -4,7 +4,7 @@ title: Stdio
|
|
|
4
4
|
|
|
5
5
|
The object `stdio` is available from everywhere. *This will change in the
|
|
6
6
|
future. [Interacting with STDIO is IO and will be
|
|
7
|
-
isolated.](https://
|
|
7
|
+
isolated.](https://codeberg.org/moonglum/halunke/issues/4)*
|
|
8
8
|
|
|
9
9
|
## `puts`
|
|
10
10
|
|
data/docs/web.md
CHANGED
|
@@ -4,7 +4,7 @@ title: Web
|
|
|
4
4
|
|
|
5
5
|
The object `web` is available from everywhere. *This will change in the future.
|
|
6
6
|
[Interacting with STDIO is IO and will be
|
|
7
|
-
isolated.](https://
|
|
7
|
+
isolated.](https://codeberg.org/moonglum/halunke/issues/4)*
|
|
8
8
|
|
|
9
9
|
You can send the `run on` message to `web`. It expects the first object to be
|
|
10
10
|
your application (more on that later) and the second one the bind address and
|
data/exe/halunke
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
|
+
if File.exist?(File.expand_path("../.git", __dir__))
|
|
4
|
+
lib = File.expand_path("../lib", __dir__)
|
|
5
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
6
|
+
end
|
|
7
|
+
|
|
3
8
|
require "halunke/version"
|
|
4
9
|
require "halunke/interpreter"
|
|
5
|
-
require "
|
|
10
|
+
require "reline"
|
|
6
11
|
|
|
7
12
|
interpreter = Halunke::Interpreter.new
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
Reline.completion_proc = ->(*) {[]}
|
|
10
15
|
|
|
11
16
|
if ARGV.length == 0
|
|
12
17
|
puts "Halunke #{Halunke::VERSION} REPL. Ctrl+d to quit"
|
|
13
|
-
while (line =
|
|
18
|
+
while (line = Reline.readline(">> ", true))
|
|
14
19
|
begin
|
|
15
20
|
value = interpreter.eval(line, error_mode: :repl)
|
|
16
21
|
puts "=> #{value}" if value
|
data/halunke.gemspec
CHANGED
|
@@ -21,11 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = ["lib"]
|
|
23
23
|
|
|
24
|
-
spec.add_dependency "
|
|
25
|
-
|
|
26
|
-
spec.
|
|
27
|
-
spec.add_development_dependency "bundler", "~> 1.17.2"
|
|
28
|
-
spec.add_development_dependency "rake", "~> 12.3.2"
|
|
29
|
-
spec.add_development_dependency "minitest", "~> 5.11.3"
|
|
30
|
-
spec.add_development_dependency "racc", "~> 1.4.15"
|
|
24
|
+
spec.add_dependency "rackup", "~> 2.3"
|
|
25
|
+
spec.add_dependency "webrick"
|
|
26
|
+
spec.add_dependency "reline"
|
|
31
27
|
end
|