loxxy 0.0.3

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3f8733558204a56db1177c9c25e5fae5af1676c455b1e3a2f3145a70fae741a7
4
+ data.tar.gz: ac99f27c25e52703adea30eca1db61671a275355a4a3a00657f2f0359e7fe57f
5
+ SHA512:
6
+ metadata.gz: beb8fa74fab5d2799ac982a2585a4ba8ebce992ae2b9a98d9356fe9e0afdd8d2b08d371bd9a6940e7b8761710f876c5494697a47ba1b4a047d7a38babb0d1695
7
+ data.tar.gz: 64df1b2c919c47f8852bc2885e7dc2eac5bd55b5892f2f6477e56401a9e2d1cf01080c512d2592d07472ef8ff053ba26ac0b5c29278e9aefa57cea9f639c33ba
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,379 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'exp/**/*'
4
+
5
+ Layout/ArgumentAlignment:
6
+ Enabled: false
7
+
8
+ Layout/ArrayAlignment:
9
+ Enabled: true
10
+ EnforcedStyle: with_fixed_indentation
11
+
12
+ Layout/CaseIndentation:
13
+ Enabled: false
14
+
15
+ Layout/ClosingHeredocIndentation:
16
+ Enabled: false
17
+
18
+ Layout/CommentIndentation:
19
+ Enabled: false
20
+
21
+ Layout/ElseAlignment:
22
+ Enabled: false
23
+
24
+ Layout/EmptyLines:
25
+ Enabled: false
26
+
27
+ Layout/EndAlignment:
28
+ Enabled: false
29
+
30
+ Layout/EndOfLine:
31
+ Enabled: true
32
+ EnforcedStyle: lf
33
+
34
+ Layout/FirstArgumentIndentation:
35
+ Enabled: false
36
+
37
+ Layout/HashAlignment:
38
+ Enabled: false
39
+
40
+ Layout/IndentationWidth:
41
+ Enabled: false
42
+
43
+ Layout/IndentationConsistency:
44
+ Enabled: true
45
+
46
+ Layout/HeredocIndentation:
47
+ Enabled: false
48
+
49
+ Layout/MultilineHashBraceLayout:
50
+ Enabled: true
51
+
52
+ Layout/MultilineMethodCallBraceLayout:
53
+ Enabled: true
54
+ EnforcedStyle: same_line
55
+
56
+ Layout/SpaceAroundOperators:
57
+ Enabled: true
58
+
59
+ Layout/SpaceInsideParens:
60
+ Enabled: true
61
+
62
+ Layout/IndentationStyle:
63
+ Enabled: true
64
+
65
+ Layout/SpaceAroundMethodCallOperator:
66
+ Enabled: true
67
+
68
+ Layout/TrailingEmptyLines:
69
+ Enabled: true
70
+
71
+ Layout/TrailingWhitespace:
72
+ Enabled: true
73
+
74
+ Lint/DuplicateBranch:
75
+ Enabled: true
76
+
77
+ Lint/DuplicateRegexpCharacterClassElement:
78
+ Enabled: true
79
+
80
+ Lint/EmptyBlock:
81
+ Enabled: true
82
+
83
+ Lint/EmptyClass:
84
+ Enabled: false
85
+
86
+ Lint/Loop:
87
+ Enabled: true
88
+
89
+ Lint/NoReturnInBeginEndBlocks:
90
+ Enabled: true
91
+
92
+ Lint/RaiseException:
93
+ Enabled: true
94
+
95
+ Lint/RescueException:
96
+ Enabled: true
97
+
98
+ Lint/StructNewOverride:
99
+ Enabled: true
100
+
101
+ Lint/ToEnumArguments:
102
+ Enabled: true
103
+
104
+ Lint/UnexpectedBlockArity:
105
+ Enabled: true
106
+
107
+ Lint/UnmodifiedReduceAccumulator:
108
+ Enabled: true
109
+
110
+ Lint/UnusedMethodArgument:
111
+ Enabled: true
112
+
113
+ Lint/UselessAccessModifier:
114
+ Enabled: true
115
+
116
+ Lint/Void:
117
+ Enabled: false
118
+
119
+ Lint/UselessAssignment:
120
+ Enabled: true
121
+
122
+ Metrics/AbcSize:
123
+ Enabled: false
124
+
125
+ Metrics/BlockLength:
126
+ Enabled: true
127
+ Max: 350
128
+
129
+ Metrics/BlockNesting:
130
+ Enabled: true
131
+ Max: 5
132
+
133
+ Metrics/ClassLength:
134
+ Enabled: true
135
+ Max: 450
136
+
137
+ Metrics/CyclomaticComplexity:
138
+ Enabled: false
139
+
140
+ Layout/LineLength:
141
+ Enabled: false
142
+ Max: 90
143
+
144
+ Metrics/MethodLength:
145
+ Enabled: true
146
+ Max: 60
147
+
148
+ Metrics/ModuleLength:
149
+ Enabled: true
150
+ Max: 500
151
+
152
+ Metrics/PerceivedComplexity:
153
+ Enabled: false
154
+
155
+ Naming/ConstantName:
156
+ Enabled: false
157
+
158
+ Naming/ClassAndModuleCamelCase:
159
+ Enabled: false
160
+
161
+ Naming/BlockParameterName:
162
+ Enabled: true
163
+
164
+ Naming/MethodParameterName:
165
+ Enabled: false
166
+
167
+ Naming/VariableName:
168
+ Enabled: false
169
+
170
+ Style/Alias:
171
+ Enabled: true
172
+
173
+ Style/ArgumentsForwarding:
174
+ Enabled: true
175
+
176
+ Style/AsciiComments:
177
+ Enabled: false
178
+
179
+ Style/BarePercentLiterals:
180
+ Enabled: false
181
+
182
+ Style/BlockComments:
183
+ Enabled: false
184
+
185
+ Style/CharacterLiteral:
186
+ Enabled: false
187
+
188
+ Style/ClassCheck:
189
+ Enabled: false
190
+
191
+ Style/ClassVars:
192
+ Enabled: false
193
+
194
+ Style/CollectionCompact:
195
+ Enabled: true
196
+
197
+ Style/ColonMethodCall:
198
+ Enabled: false
199
+
200
+ Style/CommentAnnotation:
201
+ Enabled: false
202
+
203
+ Style/CommentedKeyword:
204
+ Enabled: false
205
+
206
+ Style/ConditionalAssignment:
207
+ Enabled: false
208
+
209
+ Style/DefWithParentheses:
210
+ Enabled: true
211
+
212
+ Style/Documentation:
213
+ Enabled: false
214
+
215
+ Style/DocumentDynamicEvalDefinition:
216
+ Enabled: true
217
+
218
+ Style/ExpandPathArguments:
219
+ Enabled: false
220
+
221
+ Style/ExponentialNotation:
222
+ Enabled: true
223
+
224
+ Style/GuardClause:
225
+ Enabled: false
226
+
227
+ Style/HashEachMethods:
228
+ Enabled: true
229
+
230
+ Style/HashTransformKeys:
231
+ Enabled: true
232
+
233
+ Style/HashTransformValues:
234
+ Enabled: true
235
+
236
+ Style/IfUnlessModifier:
237
+ Enabled: false
238
+
239
+ Style/InverseMethods:
240
+ Enabled: true
241
+
242
+ Style/MissingRespondToMissing:
243
+ Enabled: false
244
+
245
+ Style/NegatedIfElseCondition:
246
+ Enabled: true
247
+
248
+ Style/Next:
249
+ Enabled: false
250
+
251
+ Style/NilLambda:
252
+ Enabled: true
253
+
254
+ Style/NumericLiterals:
255
+ Enabled: false
256
+
257
+ Style/RaiseArgs:
258
+ Enabled: true
259
+
260
+ Style/RedundantArgument:
261
+ Enabled: true
262
+
263
+ Style/RedundantReturn:
264
+ Enabled: false
265
+
266
+ Style/RedundantSelf:
267
+ Enabled: true
268
+
269
+ Style/RegexpLiteral:
270
+ Enabled: false
271
+
272
+ Style/PercentLiteralDelimiters:
273
+ Enabled: false
274
+
275
+ Style/StderrPuts:
276
+ Enabled: false
277
+
278
+ Style/StringLiterals:
279
+ Enabled: true
280
+
281
+ Style/SwapValues:
282
+ Enabled: true
283
+
284
+ Style/TernaryParentheses:
285
+ Enabled: false
286
+
287
+ Style/UnlessElse:
288
+ Enabled: false
289
+
290
+ # Rubocop complains when it doesn't find an explicit setting for the following cops:
291
+ Layout/EmptyLinesAroundAttributeAccessor:
292
+ Enabled: true
293
+
294
+ Lint/BinaryOperatorWithIdenticalOperands:
295
+ Enabled: true
296
+
297
+ Lint/DeprecatedOpenSSLConstant:
298
+ Enabled: true
299
+
300
+ Lint/DuplicateElsifCondition:
301
+ Enabled: true
302
+
303
+ Lint/DuplicateRescueException:
304
+ Enabled: true
305
+
306
+ Lint/EmptyConditionalBody:
307
+ Enabled: true
308
+
309
+ Lint/FloatComparison:
310
+ Enabled: true
311
+
312
+ Lint/MissingSuper:
313
+ Enabled: true
314
+
315
+ Lint/MixedRegexpCaptureTypes:
316
+ Enabled: true
317
+
318
+ Lint/OutOfRangeRegexpRef:
319
+ Enabled: true
320
+
321
+ Lint/SelfAssignment:
322
+ Enabled: true
323
+
324
+ Lint/TopLevelReturnWithArgument:
325
+ Enabled: true
326
+
327
+ Lint/UnreachableLoop:
328
+ Enabled: true
329
+
330
+ Style/AccessorGrouping:
331
+ Enabled: true
332
+
333
+ Style/ArrayCoercion:
334
+ Enabled: true
335
+
336
+ Style/BisectedAttrAccessor:
337
+ Enabled: true
338
+
339
+ Style/CaseLikeIf:
340
+ Enabled: true
341
+
342
+ Style/ExplicitBlockArgument:
343
+ Enabled: true
344
+
345
+ Style/GlobalStdStream:
346
+ Enabled: true
347
+
348
+ Style/HashAsLastArrayItem:
349
+ Enabled: true
350
+
351
+ Style/HashLikeCase:
352
+ Enabled: true
353
+
354
+ Style/OptionalBooleanParameter:
355
+ Enabled: true
356
+
357
+ Style/RedundantAssignment:
358
+ Enabled: true
359
+
360
+ Style/RedundantFetchBlock:
361
+ Enabled: true
362
+
363
+ Style/RedundantFileExtensionInRequire:
364
+ Enabled: true
365
+
366
+ Style/RedundantRegexpCharacterClass:
367
+ Enabled: true
368
+
369
+ Style/RedundantRegexpEscape:
370
+ Enabled: true
371
+
372
+ Style/SingleArgumentDig:
373
+ Enabled: true
374
+
375
+ Style/SlicingWithRange:
376
+ Enabled: true
377
+
378
+ Style/StringConcatenation:
379
+ Enabled: true
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.6.3
6
+ before_install: gem install bundler -v 2.1.4
@@ -0,0 +1,24 @@
1
+ ## [0.0.3] - 2020-12-29
2
+ - Scanner can recognize strings and nil tokens
3
+ ### Added
4
+ - class `Datatype::Nil` for representing nil tokens in Lox
5
+ - class `Datatype::LXString` for representing Lox strings
6
+
7
+ ### Changed
8
+ - Method `BuilinDatatype::validated_value` now accepts the input value as is.
9
+ - `Frontend::Scanner` updated code to recognize strings and nil
10
+ - File `scanner_spec.rb` Added tests for strings, nil scanning
11
+
12
+ ## [0.0.2] - 2020-12-28
13
+ - Scanner can recognize keywords, boolean and numbers
14
+ ### Added
15
+ - `Datatype` module and classes
16
+
17
+ ### Changed
18
+ - `Frontend::Scanner` updated code to recognize booleans and numbers
19
+ - File `scanner_spec.rb` Added tests for keywords, booleans and number scanning
20
+ - File `README.md` fixed a couple of typos.
21
+
22
+ ## [0.0.1] - 2020-12-27
23
+ ### Added
24
+ - Initial Github commit
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in loxxy.gemspec
6
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-2021 Dimitri Geshef
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.