nasl 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nasl/parser/block.rb +1 -1
- data/lib/nasl/parser/node.rb +5 -2
- data/lib/nasl/parser/repeat.rb +3 -3
- data/lib/nasl/token.rb +1 -1
- data/lib/nasl/version.rb +1 -1
- metadata +10 -10
data/lib/nasl/parser/block.rb
CHANGED
data/lib/nasl/parser/node.rb
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
module Nasl
|
28
28
|
class Node
|
29
|
-
attr_reader :tokens
|
29
|
+
attr_reader :ctx, :tokens
|
30
30
|
|
31
31
|
def initialize(tree, *tokens)
|
32
32
|
# Register new node in the tree.
|
@@ -38,10 +38,13 @@ module Nasl
|
|
38
38
|
|
39
39
|
# Store all of the tokens that made up this node.
|
40
40
|
@tokens = tokens
|
41
|
+
|
42
|
+
# Extract the context object from the first token.
|
43
|
+
@ctx = @tokens.first.ctx
|
41
44
|
end
|
42
45
|
|
43
46
|
def context(*args)
|
44
|
-
@
|
47
|
+
@ctx.context(region, *args)
|
45
48
|
end
|
46
49
|
|
47
50
|
def region
|
data/lib/nasl/parser/repeat.rb
CHANGED
data/lib/nasl/token.rb
CHANGED
data/lib/nasl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nasl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-28 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &17197216020 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *17197216020
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: builder
|
27
|
-
requirement: &
|
27
|
+
requirement: &17197215600 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *17197215600
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: racc
|
38
|
-
requirement: &
|
38
|
+
requirement: &17197215180 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *17197215180
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rainbow
|
49
|
-
requirement: &
|
49
|
+
requirement: &17197214760 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *17197214760
|
58
58
|
description:
|
59
59
|
email:
|
60
60
|
- mak@kolybabi.com
|