Category talk:Wren-pattern: Difference between revisions
m
→Source code: Typos and other minor errors.
(→Source code: Bug fix.) |
m (→Source code: Typos and other minor errors.) |
||
Line 191:
<lang ecmascript>/* Module "pattern.wren" */
/* Match represents a single
Match objects are immutable.
*/
Line 198:
// from the start of the string and its capture list. This is a private constructor
// intended to be called from the Pattern class as there should be no need for the user
// to
construct new_(text, index, captures) {
if (!(text is String)) Fiber.abort("Match text must be a string.")
Line 212:
// Properties.
text { _text } // the text of the match
index { _index } // its
length { _text.count } // its length
span { [_index, index + length - 1] } // a list of its starting and ending indices
Line 229:
// as a codepoint offset from the start of the string. This is a private constructor
// intended to be called from the Pattern class as there should be no need for the user
// to
construct new_(text, index) {
if (!(text is String)) Fiber.abort("Capture text must be a string.")
Line 241:
// Properties.
text { _text } // the text of the capture
index { _index } // its
length { _text.count } // its length
span { [_index, index + length - 1] } // a list of its starting and ending indices
Line 972:
// Type aliases for classes in case of any name clashes with other modules.
var
var
var
Pattern.init_()</lang>
|