cucumber-gherkin 39.0.0 → 39.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3390da8ea9dbe24ab09c4baf1a054cb1c916305e3c0fd1fb78ce06a845454392
4
- data.tar.gz: dd6a327f244affc5da99ff7933821dabf8af2ad42aab909a6138cf2df5033621
3
+ metadata.gz: 31f05ad7c5c544a8a394fb819b4e975cf21f5215a51c7aad82d9fb339d588d3d
4
+ data.tar.gz: 4f6da21e84f48d4c70f3712f4acc0e7d5e21ffa268222ca1b22a7d6898c46a7b
5
5
  SHA512:
6
- metadata.gz: 0d1a8ee1ea8e4f2e6ff3aa21b8e605f63598d572df5b4f266c20a21902cb52812ec693c155ebb25b19a1585522a995d77add1e2b691393f97cfd701cd54c0499
7
- data.tar.gz: 613edd7b2d08f9cc97f9b5a282f3ede5bd56246cb7c8de2a9be6785e0885263dfcc0c7ad5fb91887e938432ef5366fe1a576a388659ab3764b6d646594299e12
6
+ metadata.gz: 6515f3dc17dbeefed6a772f66facf81041421169a07eb5909da397bf5c76dc0ac7cd1197874a1baa3d7425b0633dcfa045b59f2119c053117ad9956f37487d82
7
+ data.tar.gz: d80b57047e9a77ff8b1d285f41243e67dc10dd51d99fcbd4bc4e9342fa8e454b05f9917dab8beb474ac5db44870d73e87f0fb0c6e126d244010b781ab00d9c58
@@ -3323,45 +3323,103 @@
3323
3323
  "tr": {
3324
3324
  "and": [
3325
3325
  "* ",
3326
- "Ve "
3326
+ "Ve ",
3327
+ "Hem de ",
3328
+ "Bir de ",
3329
+ "Ayrıca ",
3330
+ "İlaveten ",
3331
+ "Buna ek olarak "
3327
3332
  ],
3328
3333
  "background": [
3329
- "Geçmiş"
3334
+ "Geçmiş",
3335
+ "Arka Plan",
3336
+ "Ön Koşul",
3337
+ "Önkoşul",
3338
+ "Önceki Durum",
3339
+ "Giriş",
3340
+ "Mukaddime",
3341
+ "Mevcut Durum"
3330
3342
  ],
3331
3343
  "but": [
3332
3344
  "* ",
3333
3345
  "Fakat ",
3334
- "Ama "
3335
- ],
3336
- "examples": [
3337
- "Örnekler"
3338
- ],
3339
- "feature": [
3340
- "Özellik"
3341
- ],
3342
- "given": [
3343
- "* ",
3344
- "Diyelim ki "
3346
+ "Ama ",
3347
+ "Ancak ",
3348
+ "Yalnız ",
3349
+ "Lakin ",
3350
+ "Meğer ki ",
3351
+ "Buna mukabil ",
3352
+ "Aksi halde "
3353
+ ],
3354
+ "examples": [
3355
+ "Örnekler",
3356
+ "Değerler"
3357
+ ],
3358
+ "feature": [
3359
+ "Özellik",
3360
+ "İş Gereksinimi",
3361
+ "Gereksinim",
3362
+ "İşlev",
3363
+ "Kullanıcı Hikayesi",
3364
+ "Yetenek",
3365
+ "Teknik Gereksinim"
3366
+ ],
3367
+ "given": [
3368
+ "* ",
3369
+ "Mevcut ",
3370
+ "Önceden ",
3371
+ "Geçmişte ",
3372
+ "Daha önce ",
3373
+ "Halihazırda ",
3374
+ "Zaten ",
3375
+ "Sistemde ",
3376
+ "Diyelim ki ",
3377
+ "Varsayalım ki ",
3378
+ "Farz edelim ki ",
3379
+ "Kabul edelim ki ",
3380
+ "Başlangıçta ",
3381
+ "Varsayılan olarak ",
3382
+ "Biliniyor ki "
3345
3383
  ],
3346
3384
  "name": "Turkish",
3347
3385
  "native": "Türkçe",
3348
3386
  "rule": [
3349
- "Kural"
3387
+ "Kural",
3388
+ "İş Kuralı",
3389
+ "Kaide",
3390
+ "Hüküm",
3391
+ "Madde"
3350
3392
  ],
3351
3393
  "scenario": [
3352
3394
  "Örnek",
3353
- "Senaryo"
3395
+ "Senaryo",
3396
+ "Durum",
3397
+ "Vaka"
3354
3398
  ],
3355
3399
  "scenarioOutline": [
3356
- "Senaryo taslağı"
3400
+ "Senaryo taslağı",
3401
+ "Senaryo şablonu"
3357
3402
  ],
3358
3403
  "then": [
3359
3404
  "* ",
3360
- "O zaman "
3405
+ "Beklenen ",
3406
+ "O zaman ",
3407
+ "Sonuç olarak ",
3408
+ "Böylece ",
3409
+ "Bunun üzerine ",
3410
+ "Bu durumda ",
3411
+ "O takdirde ",
3412
+ "Şu halde ",
3413
+ "Netice itibariyle ",
3414
+ "Buna binaen "
3361
3415
  ],
3362
3416
  "when": [
3363
3417
  "* ",
3364
- "Eğer ki "
3418
+ "Eğer ",
3419
+ "Eğer ki ",
3420
+ "Ne zaman ",
3421
+ "Ne zaman ki ",
3422
+ "Şayet "
3365
3423
  ]
3366
3424
  },
3367
3425
  "tt": {
@@ -344,7 +344,6 @@ module Gherkin
344
344
  end
345
345
 
346
346
  state_comment = "State: 0 - Start"
347
- token.detach
348
347
  expected_tokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"]
349
348
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
350
349
  raise error if (stop_at_first_error)
@@ -372,7 +371,6 @@ module Gherkin
372
371
  end
373
372
 
374
373
  state_comment = "State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0"
375
- token.detach
376
374
  expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]
377
375
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
378
376
  raise error if (stop_at_first_error)
@@ -400,7 +398,6 @@ module Gherkin
400
398
  end
401
399
 
402
400
  state_comment = "State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0"
403
- token.detach
404
401
  expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]
405
402
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
406
403
  raise error if (stop_at_first_error)
@@ -468,7 +465,6 @@ module Gherkin
468
465
  end
469
466
 
470
467
  state_comment = "State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0"
471
- token.detach
472
468
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
473
469
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
474
470
  raise error if (stop_at_first_error)
@@ -536,7 +532,6 @@ module Gherkin
536
532
  end
537
533
 
538
534
  state_comment = "State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
539
- token.detach
540
535
  expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
541
536
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
542
537
  raise error if (stop_at_first_error)
@@ -603,7 +598,6 @@ module Gherkin
603
598
  end
604
599
 
605
600
  state_comment = "State: 5 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0"
606
- token.detach
607
601
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
608
602
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
609
603
  raise error if (stop_at_first_error)
@@ -670,7 +664,6 @@ module Gherkin
670
664
  end
671
665
 
672
666
  state_comment = "State: 6 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
673
- token.detach
674
667
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
675
668
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
676
669
  raise error if (stop_at_first_error)
@@ -747,7 +740,6 @@ module Gherkin
747
740
  end
748
741
 
749
742
  state_comment = "State: 7 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0"
750
- token.detach
751
743
  expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
752
744
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
753
745
  raise error if (stop_at_first_error)
@@ -824,7 +816,6 @@ module Gherkin
824
816
  end
825
817
 
826
818
  state_comment = "State: 8 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
827
- token.detach
828
819
  expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
829
820
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
830
821
  raise error if (stop_at_first_error)
@@ -853,7 +844,6 @@ module Gherkin
853
844
  end
854
845
 
855
846
  state_comment = "State: 9 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0"
856
- token.detach
857
847
  expected_tokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"]
858
848
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
859
849
  raise error if (stop_at_first_error)
@@ -939,7 +929,6 @@ module Gherkin
939
929
  end
940
930
 
941
931
  state_comment = "State: 10 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0"
942
- token.detach
943
932
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
944
933
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
945
934
  raise error if (stop_at_first_error)
@@ -1027,7 +1016,6 @@ module Gherkin
1027
1016
  end
1028
1017
 
1029
1018
  state_comment = "State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
1030
- token.detach
1031
1019
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
1032
1020
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1033
1021
  raise error if (stop_at_first_error)
@@ -1125,7 +1113,6 @@ module Gherkin
1125
1113
  end
1126
1114
 
1127
1115
  state_comment = "State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0"
1128
- token.detach
1129
1116
  expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
1130
1117
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1131
1118
  raise error if (stop_at_first_error)
@@ -1225,7 +1212,6 @@ module Gherkin
1225
1212
  end
1226
1213
 
1227
1214
  state_comment = "State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
1228
- token.detach
1229
1215
  expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
1230
1216
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1231
1217
  raise error if (stop_at_first_error)
@@ -1254,7 +1240,6 @@ module Gherkin
1254
1240
  end
1255
1241
 
1256
1242
  state_comment = "State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0"
1257
- token.detach
1258
1243
  expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
1259
1244
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1260
1245
  raise error if (stop_at_first_error)
@@ -1354,7 +1339,6 @@ module Gherkin
1354
1339
  end
1355
1340
 
1356
1341
  state_comment = "State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0"
1357
- token.detach
1358
1342
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
1359
1343
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1360
1344
  raise error if (stop_at_first_error)
@@ -1456,7 +1440,6 @@ module Gherkin
1456
1440
  end
1457
1441
 
1458
1442
  state_comment = "State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
1459
- token.detach
1460
1443
  expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
1461
1444
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1462
1445
  raise error if (stop_at_first_error)
@@ -1556,7 +1539,6 @@ module Gherkin
1556
1539
  end
1557
1540
 
1558
1541
  state_comment = "State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0"
1559
- token.detach
1560
1542
  expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
1561
1543
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1562
1544
  raise error if (stop_at_first_error)
@@ -1584,7 +1566,6 @@ module Gherkin
1584
1566
  end
1585
1567
 
1586
1568
  state_comment = "State: 18 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>Tags:0>#TagLine:0"
1587
- token.detach
1588
1569
  expected_tokens = ["#TagLine", "#RuleLine", "#Comment", "#Empty"]
1589
1570
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1590
1571
  raise error if (stop_at_first_error)
@@ -1655,7 +1636,6 @@ module Gherkin
1655
1636
  end
1656
1637
 
1657
1638
  state_comment = "State: 19 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>#RuleLine:0"
1658
- token.detach
1659
1639
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
1660
1640
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1661
1641
  raise error if (stop_at_first_error)
@@ -1726,7 +1706,6 @@ module Gherkin
1726
1706
  end
1727
1707
 
1728
1708
  state_comment = "State: 20 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
1729
- token.detach
1730
1709
  expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
1731
1710
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1732
1711
  raise error if (stop_at_first_error)
@@ -1796,7 +1775,6 @@ module Gherkin
1796
1775
  end
1797
1776
 
1798
1777
  state_comment = "State: 21 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0"
1799
- token.detach
1800
1778
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
1801
1779
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1802
1780
  raise error if (stop_at_first_error)
@@ -1866,7 +1844,6 @@ module Gherkin
1866
1844
  end
1867
1845
 
1868
1846
  state_comment = "State: 22 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
1869
- token.detach
1870
1847
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"]
1871
1848
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1872
1849
  raise error if (stop_at_first_error)
@@ -1946,7 +1923,6 @@ module Gherkin
1946
1923
  end
1947
1924
 
1948
1925
  state_comment = "State: 23 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0"
1949
- token.detach
1950
1926
  expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
1951
1927
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
1952
1928
  raise error if (stop_at_first_error)
@@ -2026,7 +2002,6 @@ module Gherkin
2026
2002
  end
2027
2003
 
2028
2004
  state_comment = "State: 24 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
2029
- token.detach
2030
2005
  expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
2031
2006
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2032
2007
  raise error if (stop_at_first_error)
@@ -2055,7 +2030,6 @@ module Gherkin
2055
2030
  end
2056
2031
 
2057
2032
  state_comment = "State: 25 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0"
2058
- token.detach
2059
2033
  expected_tokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"]
2060
2034
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2061
2035
  raise error if (stop_at_first_error)
@@ -2144,7 +2118,6 @@ module Gherkin
2144
2118
  end
2145
2119
 
2146
2120
  state_comment = "State: 26 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0"
2147
- token.detach
2148
2121
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
2149
2122
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2150
2123
  raise error if (stop_at_first_error)
@@ -2235,7 +2208,6 @@ module Gherkin
2235
2208
  end
2236
2209
 
2237
2210
  state_comment = "State: 27 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
2238
- token.detach
2239
2211
  expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
2240
2212
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2241
2213
  raise error if (stop_at_first_error)
@@ -2336,7 +2308,6 @@ module Gherkin
2336
2308
  end
2337
2309
 
2338
2310
  state_comment = "State: 28 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0"
2339
- token.detach
2340
2311
  expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
2341
2312
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2342
2313
  raise error if (stop_at_first_error)
@@ -2439,7 +2410,6 @@ module Gherkin
2439
2410
  end
2440
2411
 
2441
2412
  state_comment = "State: 29 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0"
2442
- token.detach
2443
2413
  expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
2444
2414
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2445
2415
  raise error if (stop_at_first_error)
@@ -2468,7 +2438,6 @@ module Gherkin
2468
2438
  end
2469
2439
 
2470
2440
  state_comment = "State: 30 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0"
2471
- token.detach
2472
2441
  expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]
2473
2442
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2474
2443
  raise error if (stop_at_first_error)
@@ -2571,7 +2540,6 @@ module Gherkin
2571
2540
  end
2572
2541
 
2573
2542
  state_comment = "State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0"
2574
- token.detach
2575
2543
  expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
2576
2544
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2577
2545
  raise error if (stop_at_first_error)
@@ -2676,7 +2644,6 @@ module Gherkin
2676
2644
  end
2677
2645
 
2678
2646
  state_comment = "State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>__alt1:0>#Other:0"
2679
- token.detach
2680
2647
  expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"]
2681
2648
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2682
2649
  raise error if (stop_at_first_error)
@@ -2779,7 +2746,6 @@ module Gherkin
2779
2746
  end
2780
2747
 
2781
2748
  state_comment = "State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0"
2782
- token.detach
2783
2749
  expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
2784
2750
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2785
2751
  raise error if (stop_at_first_error)
@@ -2798,7 +2764,6 @@ module Gherkin
2798
2764
  end
2799
2765
 
2800
2766
  state_comment = "State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
2801
- token.detach
2802
2767
  expected_tokens = ["#DocStringSeparator", "#Other"]
2803
2768
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2804
2769
  raise error if (stop_at_first_error)
@@ -2897,7 +2862,6 @@ module Gherkin
2897
2862
  end
2898
2863
 
2899
2864
  state_comment = "State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
2900
- token.detach
2901
2865
  expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
2902
2866
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2903
2867
  raise error if (stop_at_first_error)
@@ -2916,7 +2880,6 @@ module Gherkin
2916
2880
  end
2917
2881
 
2918
2882
  state_comment = "State: 37 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
2919
- token.detach
2920
2883
  expected_tokens = ["#DocStringSeparator", "#Other"]
2921
2884
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2922
2885
  raise error if (stop_at_first_error)
@@ -2992,7 +2955,6 @@ module Gherkin
2992
2955
  end
2993
2956
 
2994
2957
  state_comment = "State: 38 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
2995
- token.detach
2996
2958
  expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
2997
2959
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
2998
2960
  raise error if (stop_at_first_error)
@@ -3011,7 +2973,6 @@ module Gherkin
3011
2973
  end
3012
2974
 
3013
2975
  state_comment = "State: 39 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
3014
- token.detach
3015
2976
  expected_tokens = ["#DocStringSeparator", "#Other"]
3016
2977
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
3017
2978
  raise error if (stop_at_first_error)
@@ -3107,7 +3068,6 @@ module Gherkin
3107
3068
  end
3108
3069
 
3109
3070
  state_comment = "State: 40 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
3110
- token.detach
3111
3071
  expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
3112
3072
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
3113
3073
  raise error if (stop_at_first_error)
@@ -3126,7 +3086,6 @@ module Gherkin
3126
3086
  end
3127
3087
 
3128
3088
  state_comment = "State: 41 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0"
3129
- token.detach
3130
3089
  expected_tokens = ["#DocStringSeparator", "#Other"]
3131
3090
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
3132
3091
  raise error if (stop_at_first_error)
@@ -3199,7 +3158,6 @@ module Gherkin
3199
3158
  end
3200
3159
 
3201
3160
  state_comment = "State: 42 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0"
3202
- token.detach
3203
3161
  expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"]
3204
3162
  error = token.eof? ? UnexpectedEOFException.new(token, expected_tokens, state_comment) : UnexpectedTokenException.new(token, expected_tokens, state_comment)
3205
3163
  raise error if (stop_at_first_error)
@@ -3208,13 +3166,11 @@ module Gherkin
3208
3166
  end
3209
3167
 
3210
3168
  def lookahead0(context, current_token)
3211
- current_token.detach
3212
3169
  token = nil
3213
3170
  queue = []
3214
3171
  match = false
3215
3172
  loop do
3216
3173
  token = read_token(context)
3217
- token.detach
3218
3174
  queue.push(token)
3219
3175
 
3220
3176
  if (false || match_ScenarioLine(context, token))
@@ -3231,13 +3187,11 @@ module Gherkin
3231
3187
  end
3232
3188
 
3233
3189
  def lookahead1(context, current_token)
3234
- current_token.detach
3235
3190
  token = nil
3236
3191
  queue = []
3237
3192
  match = false
3238
3193
  loop do
3239
3194
  token = read_token(context)
3240
- token.detach
3241
3195
  queue.push(token)
3242
3196
 
3243
3197
  if (false || match_ExamplesLine(context, token))
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'cucumber/messages'
4
+
4
5
  require_relative '../parser'
5
6
  require_relative '../token_matcher'
6
7
  require_relative '../pickles/compiler'
@@ -8,12 +9,12 @@ require_relative '../pickles/compiler'
8
9
  module Gherkin
9
10
  module Stream
10
11
  class ParserMessageStream
11
- def initialize(paths, sources, options)
12
+ def initialize(paths: [], sources: [], options: {})
12
13
  @paths = paths
13
14
  @sources = sources
14
15
  @options = options
15
16
 
16
- id_generator = options[:id_generator] || Cucumber::Messages::Helpers::IdGenerator::UUID.new
17
+ id_generator = options.fetch(:id_generator, Cucumber::Messages::Helpers::IdGenerator::UUID.new)
17
18
  @parser = Parser.new(AstBuilder.new(id_generator))
18
19
  @compiler = Pickles::Compiler.new(id_generator)
19
20
  end
@@ -87,14 +88,14 @@ module Gherkin
87
88
  def build_gherkin_document(source)
88
89
  if @options[:default_dialect]
89
90
  token_matcher = TokenMatcher.new(@options[:default_dialect])
90
- gd = @parser.parse(source.data, token_matcher)
91
+ gherkin_document = @parser.parse(source.data, token_matcher)
91
92
  else
92
- gd = @parser.parse(source.data)
93
+ gherkin_document = @parser.parse(source.data)
93
94
  end
94
95
  Cucumber::Messages::GherkinDocument.new(
95
96
  uri: source.uri,
96
- feature: gd.feature,
97
- comments: gd.comments
97
+ feature: gherkin_document.feature,
98
+ comments: gherkin_document.comments
98
99
  )
99
100
  end
100
101
  end
data/lib/gherkin/token.rb CHANGED
@@ -9,10 +9,6 @@ module Gherkin
9
9
  line.nil?
10
10
  end
11
11
 
12
- def detach
13
- # TODO: detach line - is this needed?
14
- end
15
-
16
12
  def token_value
17
13
  eof? ? "EOF" : line.get_line_text(-1)
18
14
  end
data/lib/gherkin.rb CHANGED
@@ -10,19 +10,11 @@ module Gherkin
10
10
  }.freeze
11
11
 
12
12
  def self.from_paths(paths, options = {})
13
- Stream::ParserMessageStream.new(
14
- paths,
15
- [],
16
- options
17
- ).messages
13
+ Stream::ParserMessageStream.new(paths: paths, options: options).messages
18
14
  end
19
15
 
20
16
  def self.from_sources(sources, options = {})
21
- Stream::ParserMessageStream.new(
22
- [],
23
- sources,
24
- options
25
- ).messages
17
+ Stream::ParserMessageStream.new(sources: sources, options: options).messages
26
18
  end
27
19
 
28
20
  def self.from_source(uri, data, options = {})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-gherkin
3
3
  version: !ruby/object:Gem::Version
4
- version: 39.0.0
4
+ version: 39.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gáspár Nagy
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  - !ruby/object:Gem::Version
181
181
  version: 3.2.8
182
182
  requirements: []
183
- rubygems_version: 3.6.9
183
+ rubygems_version: 4.0.6
184
184
  specification_version: 4
185
- summary: cucumber-gherkin-39.0.0
185
+ summary: cucumber-gherkin-39.1.0
186
186
  test_files: []