code-lexer 0.7 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63422a570f2d8b96e95ee2dfce7f67b797df7aabeca3b1a92c67535d497bd5f7
4
- data.tar.gz: 6b2abf7eaf8cc3518de8998b67be1fd4823c4a59db2c879aec04561e6453ac3e
3
+ metadata.gz: 327106d8eae0b7162de5a80a84431ea0e6e6718bf876cde259f7616a8552ed5b
4
+ data.tar.gz: 458d333663e4cd2d5aabce529ec789f0a3bd25233bb928f9d1d88bae4e5ac7f1
5
5
  SHA512:
6
- metadata.gz: 27a3cdf2d95c3e832c48988441e1f5eb466ec595399cbf93676fccaf6b5c6edfb58337782742ebcc1bae6b8052ab05ae3d61e01ad297706d00298a4b22160ff2
7
- data.tar.gz: 9b2e9fac2f678751f11018a13589b692871a86b4ab652524c3af9f5c042266f4398ee902e9310b77f5ded49ae8357503d99bf6740ec42de914f1da283817aa75
6
+ metadata.gz: 05c538162f9f59f10a40ab9bd3db5a5b4e0bf76e705ef47e6d271c83010860d976c43a35a859bd63f7e397fd30cf6f0478a1cf565317a27242f282cf59864ed1
7
+ data.tar.gz: e3dbc89e89f2bfddc58c3266eb8b92bd6f6c94201b72435f869c10d6f78ac819efde6cbae5aaf8d236d85718f22ab0e960aa5a8b5bfa454b94c75f18c51bcb07
@@ -0,0 +1,38 @@
1
+ lexer:
2
+ keyword:
3
+ - (?:(\b(abstract)\b|\b(arguments)\b|\b(boolean)\b|\b(break)\b|\b(byte)\b|\b(case)\b|\b(catch)\b|\b(char)\b|\b(const)\b|\b(continue)\b|\b(debugger)\b|\b(default)\b|\b(delete)\b|\b(double)\b|\b(do)\b|\b(else)\b|\b(eval)\b|\b(false)\b|\b(finally)\b|\b(final)\b|\b(float)\b|\b(for)\b|\b(function)\b|\b(goto)\b|\b(if)\b|\b(implements)\b|\b(int)\b|\b(in)\b|\b(instanceof)\b|\b(interface)\b|\b(let)\b|\b(long)\b|\b(native)\b|\b(new)\b|\b(null)\b|\b(package)\b|\b(private)\b|\b(protected)\b|\b(public)\b|\b(return)\b|\b(short)\b|\b(static)\b|\b(switch)\b|\b(synchronized)\b|\b(this)\b|\b(throws)\b|\b(throw)\b|\b(transient)\b|\b(true)\b|\b(try)\b|\b(typeof)\b|\b(var)\b|\b(void)\b|\b(volatile)\b|\b(while)\b|\b(with)\b|\b(yield)\b|\b(class)\b|\b(enum)\b|\b(export)\b|\b(extends)\b|\b(import)\b|\b(super)\b|\b(from)\b)|\b(strictfp)\b)
4
+ identifier:
5
+ - "[$A-Za-z_][$A-Za-z0-9_]*"
6
+ comment:
7
+ - \/\/[^\n\r]*(?=[\n\r])
8
+ - \/\/.*$
9
+ - \/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/
10
+ string:
11
+ - \"([^"]|\\\")*\"
12
+ - \'[^']*\'
13
+ regex:
14
+ - \/([^/]|\\\/)*\/[gim]*
15
+ number:
16
+ - \-?[0-9]*\.[0-9]e\-?[0-9]+
17
+ - \-?[0-9]*\.[0-9]
18
+ - \-?[1-9][0-9]*
19
+ - \-?0[Xx][0-9A-Fa-f]+
20
+ - \-?[0-9]
21
+ - \-?0[0-7]+
22
+ operator:
23
+ - (\=\=\=|\!\=\=)
24
+ - (\<\=|\>\=|\=\=|\!\=|\=\>)
25
+ - (\&\&|\|\||\!)
26
+ - (\+\=|\-\=|\/\=|\*\=|\%\=|\+\+|\-\-)
27
+ - (\&|\||\~|\^|\<\<|\>\>)
28
+ - (\=|\+|\-|\/|\*|\%)
29
+ - (\.|\,|\:)
30
+ - (\<|\>|\?)
31
+ parenthesis:
32
+ - (\(|\)|\[|\]|\{|\})
33
+ semicolon:
34
+ - \;
35
+ newline:
36
+ - "[\\n\\r]"
37
+ space:
38
+ - \s+
@@ -1,6 +1,6 @@
1
1
  lexer:
2
2
  keyword:
3
- - (?:abstract|arguments|boolean|break|byte|case|catch|char|const|continue|debugger|default|delete|do|double|else|eval|false|final|finally|float|for|function|goto|if|implements|in|instanceof|int|interface|let|long|native|new|null|package|private|protected|public|return|short|static|switch|synchronized|this|throw|throws|transient|true|try|typeof|var|void|volatile|while|with|yield|class|enum|export|extends|import|super|from)
3
+ - (?:(\b(arguments)\b|\b(break)\b|\b(case)\b|\b(catch)\b|\b(const)\b|\b(continue)\b|\b(debugger)\b|\b(default)\b|\b(delete)\b|\b(do)\b|\b(else)\b|\b(eval)\b|\b(false)\b|\b(finally)\b|\b(for)\b|\b(function)\b|\b(if)\b|\b(implements)\b|\b(in)\b|\b(instanceof)\b|\b(interface)\b|\b(let)\b|\b(new)\b|\b(null)\b|\b(package)\b|\b(private)\b|\b(protected)\b|\b(public)\b|\b(return)\b|\b(static)\b|\b(switch)\b|\b(this)\b|\b(throw)\b|\b(true)\b|\b(try)\b|\b(typeof)\b|\b(var)\b|\b(void)\b|\b(while)\b|\b(with)\b|\b(yield)\b|\b(class)\b|\b(enum)\b|\b(export)\b|\b(extends)\b|\b(import)\b|\b(super)\b|\b(from)\b))
4
4
  identifier:
5
5
  - "[$A-Za-z_][$A-Za-z0-9_]*"
6
6
  comment:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code-lexer
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.7'
4
+ version: '0.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Scalabrino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-05 00:00:00.000000000 Z
11
+ date: 2022-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: code-assertions
@@ -40,6 +40,7 @@ files:
40
40
  - lib/code-lexer.rb
41
41
  - lib/code-lexer/abstractor.rb
42
42
  - lib/code-lexer/config.rb
43
+ - lib/code-lexer/languages/java.yml
43
44
  - lib/code-lexer/languages/javascript.yml
44
45
  - lib/code-lexer/lexer.rb
45
46
  - lib/code-lexer/token.rb
@@ -62,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
63
  - !ruby/object:Gem::Version
63
64
  version: '0'
64
65
  requirements: []
65
- rubygems_version: 3.3.3
66
+ rubygems_version: 3.3.7
66
67
  signing_key:
67
68
  specification_version: 4
68
69
  summary: Simple source code lexer