Commit graph

302 commits

Author SHA1 Message Date
Syed Faraaz Ahmad
5fea1d08bd [ruby/prism] feat: add encoding for ibm866
(https://github.com/ruby/prism/pull/1864)

Add encoding for ibm866

---------

1a96cc71f7

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2023-11-19 01:05:41 +00:00
Orhan Toy
5d2d0962cc [ruby/prism] Add GB1988 encoding
78d3fa7172
2023-11-19 01:05:11 +00:00
Orhan Toy
71a30b7596 [ruby/prism] Add macCyrillic encoding
220b40921a
2023-11-19 01:03:19 +00:00
Martin Emde
db6492092f [ruby/prism] Fix typos in comments and docs
16b3d19758
2023-11-19 00:56:27 +00:00
Ryan Garver
cd4316a51f [ruby/prism] Big5 HKSCS encoding
3ca9823eb4
2023-11-18 13:52:17 -05:00
Mike Dalton
bbf14bbba6 [ruby/prism] Add IBM864 encoding
Fixes https://github.com/ruby/prism/pull/1868
Related #1843

abc136dfc9
2023-11-18 18:47:15 +00:00
Haldun Bayhantopcu
fdcb97833c [ruby/prism] Faster lex_keyword
23a68dcda2
2023-11-18 18:43:10 +00:00
Thomas Marshall
a6f9e6add2 [ruby/prism] Add macCentEuro encoding
ff95edbd99
2023-11-18 18:41:03 +00:00
Haldun Bayhantopcu
cbdac2f031 [ruby/prism] Silence clang analyzer warnings for the memory leaks
68112c556e
2023-11-17 20:11:11 +00:00
Peter Cai
585fdfe1f5 [ruby/prism] add Windows-874 encoding
0670dd3b9a
2023-11-17 20:06:48 +00:00
Haldun Bayhantopcu
50b7b927a3 [ruby/prism] Add macThai
f654058f50
2023-11-17 20:06:27 +00:00
Haldun Bayhantopcu
0a081a33eb [ruby/prism] Add macRoman
42b20ee399
2023-11-17 20:06:16 +00:00
Haldun Bayhantopcu
85dcfef23a [ruby/prism] Add macUkraine
440557fddc
2023-11-17 20:04:54 +00:00
Haldun Bayhantopcu
e5d6b4099e [ruby/prism] Do not allow trailing commas in calls without parenthesis
f1d56da58f
2023-11-17 15:48:57 +00:00
Haldun Bayhantopcu
4a26a65e42 [ruby/prism] Add macTurkish
2232d4b6a0
2023-11-17 14:32:40 +00:00
Kevin Newton
3bc41f4f0b [ruby/prism] Add macGreek encoding
c36d3fc647
2023-11-16 18:00:08 +00:00
Kevin Newton
4b2915f0b9 [ruby/prism] Add macRomania encoding
bb73801cf4
2023-11-16 17:39:40 +00:00
Kevin Newton
6c2defdfaa [ruby/prism] Support for the macIceland encoding
f433d1b51b
2023-11-16 17:39:39 +00:00
Kevin Newton
b753e16945 [ruby/prism] IBM862 encoding
151698bf86
2023-11-16 17:39:38 +00:00
Kevin Newton
7dba4f424d [ruby/prism] IBM861 encoding
6d2b59384a
2023-11-16 17:39:37 +00:00
Kevin Newton
91af9e8d93 [ruby/prism] IBM860 encoding
aa6163d77a
2023-11-16 17:39:37 +00:00
Kevin Newton
a7df025c3f [ruby/prism] IBM857 encoding
8c9b580f84
2023-11-16 17:39:36 +00:00
Kevin Newton
076d0957b9 [ruby/prism] IBM855 encoding
9354ad1848
2023-11-16 17:39:36 +00:00
Kevin Newton
b0a188655d [ruby/prism] IBM852 encoding
45251fcbf1
2023-11-16 17:39:35 +00:00
Kevin Newton
f93e4ac18e [ruby/prism] Split up encoding comparisons based on first letter
80fac1e4a9
2023-11-16 17:39:34 +00:00
Kevin Newton
ef748f353b [ruby/prism] IBM775 encoding
65175641b1
2023-11-16 17:39:34 +00:00
Kevin Newton
ae3c346746 [ruby/prism] IBM-737 encoding
af1a665939
2023-11-16 17:39:33 +00:00
Kevin Newton
8c44d69b9f [ruby/prism] IBM720 encoding
fc1f6ea3af
2023-11-16 17:39:33 +00:00
Kevin Newton
ba937eee0b [ruby/prism] IBM437 encoding
d60329eeb5
2023-11-16 17:39:32 +00:00
Kevin Newton
f60b974393 [ruby/prism] Add cp855 encoding
8069d143f5
2023-11-16 17:39:32 +00:00
Kevin Newton
5d7e6842b5 [ruby/prism] Add cp852 encoding
ebe83490bf
2023-11-16 17:39:31 +00:00
Kevin Newton
63c490dc4e [ruby/prism] Add remaining windows encodings
e77b549a59
2023-11-16 17:39:30 +00:00
Kevin Newton
ca789e7232 [ruby/prism] Add windows-1250 encoding
a362535ca4
2023-11-16 17:39:30 +00:00
Kevin Newton
aebc6e8b8d [ruby/prism] Fix parsing other encodings bytes >= 0x80
c787d2e076
2023-11-16 17:39:29 +00:00
Maple Ong
ae56db590f [ruby/prism] Hook up encoding file to prism
93ec917dfe
2023-11-16 17:13:16 +00:00
Haldun Bayhantopcu
e3f464522c [ruby/prism] Fix calls with splat without parenthesis
d81a77e0e3
2023-11-16 15:13:08 +00:00
Kevin Newton
d2e7a70ee6 [ruby/prism] Track the then keyword for conditionals
fef0019a25
2023-11-15 23:08:11 +00:00
Kevin Newton
db8803d583 [ruby/prism] More consistent lex modes with %q
014f714ed1
2023-11-14 21:19:12 +00:00
TSUYUSATO Kitsune
336d81a671 [ruby/prism] Check value expressions on creating a node
d60948bac3
2023-11-14 14:34:48 +00:00
TSUYUSATO Kitsune
499786de46 [ruby/prism] Check value expressions on parsing arguments and assignments
They are corresponding to `arg_value` in `parse.y`.

a4a4834e0d
2023-11-14 14:34:48 +00:00
TSUYUSATO Kitsune
3439f1e62e [ruby/prism] Add parse_value_expression
37fad74134
2023-11-14 14:34:47 +00:00
TSUYUSATO Kitsune
52a0f1d14b [ruby/prism] Add "Unexpected void value expression" error
88b7b8e1fc
2023-11-14 14:34:47 +00:00
Mike Dalessio
26d11383e5 [ruby/prism] fix: float suffix at end of file
Found by fuzzing.

d77d4fe2b7
2023-11-14 14:25:41 +00:00
Mike Dalessio
d6d1a1839a [ruby/prism] fix: nested heredoc dedentation use-after-free
Because the lex mode may be freed when popped, we need to store off
this value for dedentation.

64007322f5

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2023-11-14 14:11:55 +00:00
Mike Dalessio
e020eb26f0 [ruby/prism] fix: Handle zero-length block parameters in invalid Ruby
Found by fuzzing.

4cd6c8cf98
2023-11-14 05:25:46 +00:00
TSUYUSATO Kitsune
2fb1d37439 [ruby/prism] Reject invalid rational literals like 1e1r on lexing
Fix https://github.com/ruby/prism/pull/1586

b3bde866f2
2023-11-12 02:34:02 +00:00
TSUYUSATO Kitsune
cd91e8e73a [ruby/prism] Introduce non-associativility to in and =>
Fix https://github.com/ruby/prism/pull/1596
Fix https://github.com/ruby/prism/pull/1771
Close https://github.com/ruby/prism/pull/1773

a3413e5605
2023-11-11 20:37:28 +00:00
Kevin Newton
85db7baccb [ruby/prism] Remove extra locals added by ...
b7850f2d30
2023-11-10 21:50:12 +00:00
Kevin Newton
98e5ea9431 [ruby/prism] Disallow forwarding in blocks
2bbd35943c
2023-11-10 21:50:11 +00:00
TSUYUSATO Kitsune
fae44d6524 [ruby/prism] Reset do_loop_stack around a body of a endless method definition
Fix https://github.com/ruby/prism/pull/1772

cdf58e845e
2023-11-09 08:37:20 +00:00