17
17
"Content-Transfer-Encoding: 8bit\n"
19
19
#: ../../source/cds.rst:5
20
# fdb006ba742a437ab5f28deb122bd59e
20
# 5ca55fdb6a9045c09393b5ec83a6e5d3
21
21
msgid "Creator-Defined Statements"
24
24
#: ../../source/cds.rst:7
25
# 1da03e2231bc42c7acd288b84c58be2e
25
# b6f4932f36a74fc9aeed7af5626a063f
26
26
msgid "Creator-defined statements allow you to add your own statements to Ren'Py. This makes it possible to add things that are not supported by the current syntax of Ren'Py. creator-defined statements are currently limited to a single line, and may not contain blocks."
29
29
#: ../../source/cds.rst:12
30
# 465289e2a032493fb5d3cdb394c69d36
30
# 1b79331400604c44abd878475e34a802
31
31
msgid "Creator-defined statements must be defined in a python early block. What's more, the filename containing the user-defined statement must be be loaded earlier than any file that uses it. Since Ren'Py loads files in unicode sort order, it generally makes sense to prefix the name of any file containing a user-defined statement with 01, or some other small number."
34
34
#: ../../source/cds.rst:18
35
# 2cb7d373d49240d7b09a9253b18262b4
35
# d6e98c3d40524eed96ebf3affc563cf9
36
36
msgid "A user-defined statement cannot be used in the file in which it is defined."
39
39
#: ../../source/cds.rst:20
40
# f25baf34b5a44cdd9ddd42fcc7823cab
40
# 344fb75e4a96424fa2aeb9b08c690c98
41
41
msgid "Creator-defined statement are registered using the renpy.register_statement function."
44
44
#: ../../source/inc/statement_register:5
45
# 9bea794c178a4855873f5415a417c31c
45
# 0c6c527cd6c247fab9863793af601214
46
46
msgid "This registers a user-defined statement."
49
49
#: ../../source/inc/statement_register:10
50
# 06432997a20a40de9234a1b746bffabb
50
# 28a77f7c4e0d4b62b686c3ec153d323c
54
54
#: ../../source/inc/statement_register:8
55
# ad9d43a960804d11bf1d2dcfc6ac591a
55
# 28568192948f4c03976601f22415c572
56
56
msgid "This is either a space-separated list of names that begin the statement, or the empty string to define a new default statement (the default statement will replace the say statement)."
59
59
#: ../../source/inc/statement_register:15
60
# b7782b221a7a402c87858bc9d5348485
60
# ece967d0879540a3b2f92130d3a20e73
64
64
#: ../../source/inc/statement_register:13
65
# c2dcd84112774986aa9d66bfd34915b6
65
# bd01b2b642444075a4de979500e8fa17
66
66
msgid "This is a function that takes a Lexer object. This function should parse the statement, and return an object. This object is passed as an argument to all the other functions. The lexer argument has the following methods:"
69
69
#: ../../source/inc/statement_register:19
70
# 236d652c16784d21b806470a50fdb553
70
# ae7262bd55ee481ea599d86573767b8b
74
74
#: ../../source/inc/statement_register:18
75
# 0955742bfe9b4c7da08b0583cdcde0b2
75
# 4845462c85bb4ca881ca80b6979fb1cc
76
76
msgid "This is called to check the statement. It is passed a single object, the argument returned from parse. It should call renpy.error to report errors."
79
79
#: ../../source/inc/statement_register:23
80
# e0b39f91391f4745997ef894f0e4f7b9
80
# 6f51206d07654025ae1706e7ae6c0ede
84
84
#: ../../source/inc/statement_register:22
85
# 8a55d0874daa42549dadb52dfd2a672e
85
# 5cf8d506d124466bb25d5eef47140b1e
86
86
msgid "This is a function that is called when the statement executes. It is passed a single object, the argument returned from parse."
89
89
#: ../../source/inc/statement_register:28
90
# 9f2a4d70a1ee401182081fcb403ee0ff
90
# 3aa6b372c08e45f6acdd9a6d9fd4a106
94
94
#: ../../source/inc/statement_register:26
95
# f60efc50a9904f2682b7b70956857b09
95
# 396f59d413e14933bef5538812a56f80
96
96
msgid "This is a function that is called to predict the images used by the statement. It is passed a single object, the argument returned from parse. It should return a list of displayables used by the statement."
99
99
#: ../../source/inc/statement_register:33
100
# 2e29b253791a4eb884f890f47addd954
100
# 961c4694b53d44c4ab0898cf7801cdad
104
104
#: ../../source/inc/statement_register:31
105
# f66e133c5a0a42b48c4f6021d6874c37
105
# 070c98ccba3641f7b77085e10131a0e4
106
106
msgid "This is called to determine the next statement. It is passed a single object, the argument returned from parse. It should either return a label, or return None if execution should continue to the next statement."
109
109
#: ../../source/inc/statement_register:36
110
# c881e77dbbec4a37b6a277dfb4a61b31
110
# 312297932e394666844ccd0613394a89
114
114
#: ../../source/inc/statement_register:36
115
# e05f685da4c74869bff37f7ff16b2329
115
# 42825d9cc5bf493fb8acc159bce594ec
116
116
msgid "Used internally by Ren'Py."
119
119
#: ../../source/inc/statement_register:39
120
# 690d5de89b31432d9c87f12cf97a66be
120
# b67435f76ddf4207aeeb3e321c2c7870
124
124
#: ../../source/inc/statement_register:39
125
# d1c7653c4d4c49d689fb6cc65d9cdf6c
125
# f845a89b831847489f43845abba12756
126
126
msgid "True if this takes a block, false otherwise."
129
129
#: ../../source/inc/statement_register:43
130
# a79d7e4369f24d639579ea89f9f81907
130
# 78eb661e55624d069f9f3a3f30623cd3
134
134
#: ../../source/inc/statement_register:42
135
# 06ebd70b271f436188f59bf1ef7fa563
135
# 6dad906ebc8548d6b6134987f2af6864
136
136
msgid "True if this statement should be run at init-time. (If the statement is not already inside an init block, it's automatically placed inside an init 0 block.)"
139
139
#: ../../source/cds.rst:25
140
# d1f313d0693a485da4d8661675949f63
140
# 920cadb5695d4df69fe2b7c3b92d846e
141
141
msgid "The parse method takes a Lexer object:"
144
144
#: ../../source/cds.rst:31
145
# bfd44fdc429948b3aebec26486672744
145
# 81aeea9bcf454b3b94083d1dd2ef923d
146
146
msgid "True if the lexer is at the end of the line."
149
149
#: ../../source/cds.rst:35
150
# 22eb06208fef409c91ee207ac53f637a
150
# 429a0927175c404bb1f130e954a12f91
151
151
msgid "Matches an arbitrary regexp string."
154
154
#: ../../source/cds.rst:37
155
# d411f70bda4a47d0b2c27ee1605c74f9
155
# 2ba260f7d51044e69d75df55a8e978de
156
156
msgid "All of the statements in the lexer that match things are implemented in terms of this function. They first skip whitespace, then attempt to match against the line. If the match succeeds, the matched text is returned. Otherwise, None is returned."
159
159
#: ../../source/cds.rst:44
160
# 9f5058cfbfc74f019c8391a64143c692
160
# 7356d8cbea6f491c8164790668e98aea
161
161
msgid "Matches `s` as a keyword."
164
164
#: ../../source/cds.rst:48
165
# f4e33d0212e8449fa961ffedc0a056d8
165
# a7a3b7e1041648fa8e7e881253ac5abf
166
166
msgid "Matches a name. This does not match built-in keywords."
169
169
#: ../../source/cds.rst:52
170
# d6ec89f76d0047649acbd3cf5b269d18
170
# b0af7799673e4f5d9fbda5772739daa4
171
171
msgid "Matches any word, including keywords. Returns the"
174
174
#: ../../source/cds.rst:57
175
# 78fc4110ab0341e3bf3d2ff47aafa1a4
175
# b1325b47e70c4b39a039ff3f78a5f2bd
176
176
msgid "Matches a Ren'Py string."
179
179
#: ../../source/cds.rst:61
180
# 578909615cab4f448f3f3e6f6fbb0fac
180
# c55ec5d67680463c93249cb4ffcc2646
181
181
msgid "Matches an integer, returns a string containing the integer."
184
184
#: ../../source/cds.rst:65
185
# 977219d0d532407084f69271a784bcf7
185
# 31dfa7d49c354af3bcd5825ac7731229
186
186
msgid "Matches a floating point number, returns a string containing the floating point number."
189
189
#: ../../source/cds.rst:70
190
# fb8e975361f846cf8701fa245ff23b94
190
# 90fd31d522c547539e6b980c3c944ae4
191
191
msgid "Matches a simple python expression, returns it as a string."
194
194
#: ../../source/cds.rst:74
195
# 59ca2b4bfad74f5694768b2139a71963
195
# a1057d459dce48308f4f54b001ae70a0
196
196
msgid "Skips whitespace, the returns the rest of the line."
199
199
#: ../../source/cds.rst:78
200
# cf5c22e935ca4f949017d78695039fc4
200
# e1950cfa852a47baa6cc563173d97c04
201
201
msgid "Returns an opaque object representing the current state of the lexer."
204
204
#: ../../source/cds.rst:82
205
# 21f1bcd342204fc1b73c8e52dc37aa58
205
# 927c820388c34c36bd446b5475ab1142
206
206
msgid "When `o` is the object returned from checkpoint(), reverts the state of the lexer to what it was when checkpoint() was called. (This is used for backtracking.)"
209
209
#: ../../source/cds.rst:88
210
# 83c293feec3b40a383c21163972193f5
210
# ca3620200a664dfa9d9c976c923fc64a
211
211
msgid "Return a Lexer for the block associated with the current line."
214
214
#: ../../source/cds.rst:92
215
# d64cff8a6194486dbbffb184d67650b1
215
# 49a27ccc54974f6cbcaefed4cd603c81
216
216
msgid "In a subblock lexer, advances to the next line. This must be called before the first line, so the first line can be parsed."
219
219
#: ../../source/cds.rst:97
220
# c94179e61e6a4fe1a86613b4e76f66ac
220
# fd1b3b8ef4c34308a4bc2369a3111287
221
221
msgid "Lint Utility Functions"
224
224
#: ../../source/cds.rst:99
225
# 0737be8a3d7d406e900483ac48832d9a
225
# 5b5565ee788c4be38cbe9ed45d0190cc
226
226
msgid "These functions are useful in writing lint functions."
229
229
#: ../../source/inc/lint:5
230
# e0564b469c104308a4bb6e460791459e
230
# ac70038dfdff4425a2a678861001a140
231
231
msgid "Checks the text tags in s for correctness. Returns an error string if there is an error, or None if there is no error."
234
234
#: ../../source/cds.rst:104
235
# 7d725a97a266423a9fee0808e9d2f3c4
235
# 1cec38a9f85b4aaaa40e00428136810a
239
239
#: ../../source/cds.rst:106
240
# 496582cb2347403b9ebfd40129f56c18
240
# dc63a0845b1147ff82d8c6aab641221f
241
241
msgid "This creates a new statement \"line\" that allows lines of text to be specified without quotes. ::"
244
244
#: ../../source/cds.rst:133
245
# 1d4e6951e7844060bc737bff78ca776f
245
# 261a52491ffd4df4844859b011ea6cd8
246
246
msgid "This can be used by writing::"