Skip to content

Commit ede55b2

Browse files
Renpy: Improved language + added tests (#3125)
1 parent f3b2578 commit ede55b2

9 files changed

+874
-5
lines changed

components/prism-renpy.js

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/prism-renpy.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
true false
2+
True False
3+
4+
----------------------------------------------------
5+
6+
[
7+
["boolean", "true"], ["boolean", "false"],
8+
["boolean", "True"], ["boolean", "False"]
9+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# comment
2+
3+
----------------------------------------------------
4+
5+
[
6+
["comment", "# comment"]
7+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
renpy.register_bmfont("bmfont", 22, filename="bmfont.fnt")
2+
3+
# Resize the background of the text window if it's too small.
4+
init python:
5+
style.window.background = Frame("frame.png", 10, 10)
6+
7+
----------------------------------------------------
8+
9+
[
10+
["keyword", "renpy"],
11+
["punctuation", "."],
12+
["function", "register_bmfont"],
13+
["punctuation", "("],
14+
["string", "\"bmfont\""],
15+
["punctuation", ","],
16+
["number", "22"],
17+
["punctuation", ","],
18+
" filename",
19+
["operator", "="],
20+
["string", "\"bmfont.fnt\""],
21+
["punctuation", ")"],
22+
23+
["comment", "# Resize the background of the text window if it's too small."],
24+
25+
["keyword", "init"],
26+
["keyword", "python"],
27+
["punctuation", ":"],
28+
29+
["keyword", "style"],
30+
["punctuation", "."],
31+
["tag", "window"],
32+
["punctuation", "."],
33+
["property", "background"],
34+
["operator", "="],
35+
["function", "Frame"],
36+
["punctuation", "("],
37+
["string", "\"frame.png\""],
38+
["punctuation", ","],
39+
["number", "10"],
40+
["punctuation", ","],
41+
["number", "10"],
42+
["punctuation", ")"]
43+
]
+239
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
; None
2+
; add
3+
; adjustment
4+
; alignaround
5+
; allow
6+
; angle
7+
; animation
8+
; around
9+
; as
10+
; assert
11+
; behind
12+
; box_layout
13+
; break
14+
; build
15+
; cache
16+
; call
17+
; center
18+
; changed
19+
; child_size
20+
; choice
21+
; circles
22+
; class
23+
; clear
24+
; clicked
25+
; clipping
26+
; clockwise
27+
; config
28+
; contains
29+
; continue
30+
; corner1
31+
; corner2
32+
; counterclockwise
33+
; def
34+
; default
35+
; define
36+
; del
37+
; delay
38+
; disabled
39+
; disabled_text
40+
; dissolve
41+
; elif
42+
; else
43+
; event
44+
; except
45+
; exclude
46+
; exec
47+
; expression
48+
; fade
49+
; finally
50+
; for
51+
; from
52+
; function
53+
; global
54+
; gm_root
55+
; has
56+
; hide
57+
; id
58+
; if
59+
; import
60+
; in
61+
; init
62+
; is
63+
; jump
64+
; knot
65+
; lambda
66+
; left
67+
; less_rounded
68+
; mm_root
69+
; movie
70+
; music
71+
; null
72+
; on
73+
; onlayer
74+
; pass
75+
; pause
76+
; persistent
77+
; play
78+
; print
79+
; python
80+
; queue
81+
; raise
82+
; random
83+
; renpy
84+
; repeat
85+
; return
86+
; right
87+
; rounded_window
88+
; scene
89+
; scope
90+
; set
91+
; show
92+
; slow
93+
; slow_abortable
94+
; slow_done
95+
; sound
96+
; stop
97+
; store
98+
; style
99+
; style_group
100+
; substitute
101+
; suffix
102+
; theme
103+
; transform
104+
; transform_anchor
105+
; transpose
106+
; try
107+
; ui
108+
; unhovered
109+
; updater
110+
; use
111+
; voice
112+
; while
113+
; widget
114+
; widget_hover
115+
; widget_selected
116+
; widget_text
117+
; yield
118+
119+
----------------------------------------------------
120+
121+
[
122+
["punctuation", ";"], ["keyword", "None"],
123+
["punctuation", ";"], ["keyword", "add"],
124+
["punctuation", ";"], ["keyword", "adjustment"],
125+
["punctuation", ";"], ["keyword", "alignaround"],
126+
["punctuation", ";"], ["keyword", "allow"],
127+
["punctuation", ";"], ["keyword", "angle"],
128+
["punctuation", ";"], ["keyword", "animation"],
129+
["punctuation", ";"], ["keyword", "around"],
130+
["punctuation", ";"], ["keyword", "as"],
131+
["punctuation", ";"], ["keyword", "assert"],
132+
["punctuation", ";"], ["keyword", "behind"],
133+
["punctuation", ";"], ["keyword", "box_layout"],
134+
["punctuation", ";"], ["keyword", "break"],
135+
["punctuation", ";"], ["keyword", "build"],
136+
["punctuation", ";"], ["keyword", "cache"],
137+
["punctuation", ";"], ["keyword", "call"],
138+
["punctuation", ";"], ["keyword", "center"],
139+
["punctuation", ";"], ["keyword", "changed"],
140+
["punctuation", ";"], ["keyword", "child_size"],
141+
["punctuation", ";"], ["keyword", "choice"],
142+
["punctuation", ";"], ["keyword", "circles"],
143+
["punctuation", ";"], ["keyword", "class"],
144+
["punctuation", ";"], ["keyword", "clear"],
145+
["punctuation", ";"], ["keyword", "clicked"],
146+
["punctuation", ";"], ["keyword", "clipping"],
147+
["punctuation", ";"], ["keyword", "clockwise"],
148+
["punctuation", ";"], ["keyword", "config"],
149+
["punctuation", ";"], ["keyword", "contains"],
150+
["punctuation", ";"], ["keyword", "continue"],
151+
["punctuation", ";"], ["keyword", "corner1"],
152+
["punctuation", ";"], ["keyword", "corner2"],
153+
["punctuation", ";"], ["keyword", "counterclockwise"],
154+
["punctuation", ";"], ["keyword", "def"],
155+
["punctuation", ";"], ["keyword", "default"],
156+
["punctuation", ";"], ["keyword", "define"],
157+
["punctuation", ";"], ["keyword", "del"],
158+
["punctuation", ";"], ["keyword", "delay"],
159+
["punctuation", ";"], ["keyword", "disabled"],
160+
["punctuation", ";"], ["keyword", "disabled_text"],
161+
["punctuation", ";"], ["keyword", "dissolve"],
162+
["punctuation", ";"], ["keyword", "elif"],
163+
["punctuation", ";"], ["keyword", "else"],
164+
["punctuation", ";"], ["keyword", "event"],
165+
["punctuation", ";"], ["keyword", "except"],
166+
["punctuation", ";"], ["keyword", "exclude"],
167+
["punctuation", ";"], ["keyword", "exec"],
168+
["punctuation", ";"], ["keyword", "expression"],
169+
["punctuation", ";"], ["keyword", "fade"],
170+
["punctuation", ";"], ["keyword", "finally"],
171+
["punctuation", ";"], ["keyword", "for"],
172+
["punctuation", ";"], ["keyword", "from"],
173+
["punctuation", ";"], ["keyword", "function"],
174+
["punctuation", ";"], ["keyword", "global"],
175+
["punctuation", ";"], ["keyword", "gm_root"],
176+
["punctuation", ";"], ["keyword", "has"],
177+
["punctuation", ";"], ["keyword", "hide"],
178+
["punctuation", ";"], ["keyword", "id"],
179+
["punctuation", ";"], ["keyword", "if"],
180+
["punctuation", ";"], ["keyword", "import"],
181+
["punctuation", ";"], ["keyword", "in"],
182+
["punctuation", ";"], ["keyword", "init"],
183+
["punctuation", ";"], ["keyword", "is"],
184+
["punctuation", ";"], ["keyword", "jump"],
185+
["punctuation", ";"], ["keyword", "knot"],
186+
["punctuation", ";"], ["keyword", "lambda"],
187+
["punctuation", ";"], ["keyword", "left"],
188+
["punctuation", ";"], ["keyword", "less_rounded"],
189+
["punctuation", ";"], ["keyword", "mm_root"],
190+
["punctuation", ";"], ["keyword", "movie"],
191+
["punctuation", ";"], ["keyword", "music"],
192+
["punctuation", ";"], ["keyword", "null"],
193+
["punctuation", ";"], ["keyword", "on"],
194+
["punctuation", ";"], ["keyword", "onlayer"],
195+
["punctuation", ";"], ["keyword", "pass"],
196+
["punctuation", ";"], ["keyword", "pause"],
197+
["punctuation", ";"], ["keyword", "persistent"],
198+
["punctuation", ";"], ["keyword", "play"],
199+
["punctuation", ";"], ["keyword", "print"],
200+
["punctuation", ";"], ["keyword", "python"],
201+
["punctuation", ";"], ["keyword", "queue"],
202+
["punctuation", ";"], ["keyword", "raise"],
203+
["punctuation", ";"], ["keyword", "random"],
204+
["punctuation", ";"], ["keyword", "renpy"],
205+
["punctuation", ";"], ["keyword", "repeat"],
206+
["punctuation", ";"], ["keyword", "return"],
207+
["punctuation", ";"], ["keyword", "right"],
208+
["punctuation", ";"], ["keyword", "rounded_window"],
209+
["punctuation", ";"], ["keyword", "scene"],
210+
["punctuation", ";"], ["keyword", "scope"],
211+
["punctuation", ";"], ["keyword", "set"],
212+
["punctuation", ";"], ["keyword", "show"],
213+
["punctuation", ";"], ["keyword", "slow"],
214+
["punctuation", ";"], ["keyword", "slow_abortable"],
215+
["punctuation", ";"], ["keyword", "slow_done"],
216+
["punctuation", ";"], ["keyword", "sound"],
217+
["punctuation", ";"], ["keyword", "stop"],
218+
["punctuation", ";"], ["keyword", "store"],
219+
["punctuation", ";"], ["keyword", "style"],
220+
["punctuation", ";"], ["keyword", "style_group"],
221+
["punctuation", ";"], ["keyword", "substitute"],
222+
["punctuation", ";"], ["keyword", "suffix"],
223+
["punctuation", ";"], ["keyword", "theme"],
224+
["punctuation", ";"], ["keyword", "transform"],
225+
["punctuation", ";"], ["keyword", "transform_anchor"],
226+
["punctuation", ";"], ["keyword", "transpose"],
227+
["punctuation", ";"], ["keyword", "try"],
228+
["punctuation", ";"], ["keyword", "ui"],
229+
["punctuation", ";"], ["keyword", "unhovered"],
230+
["punctuation", ";"], ["keyword", "updater"],
231+
["punctuation", ";"], ["keyword", "use"],
232+
["punctuation", ";"], ["keyword", "voice"],
233+
["punctuation", ";"], ["keyword", "while"],
234+
["punctuation", ";"], ["keyword", "widget"],
235+
["punctuation", ";"], ["keyword", "widget_hover"],
236+
["punctuation", ";"], ["keyword", "widget_selected"],
237+
["punctuation", ";"], ["keyword", "widget_text"],
238+
["punctuation", ";"], ["keyword", "yield"]
239+
]

0 commit comments

Comments
 (0)