Classes | Defines | Typedefs | Enumerations | Functions | Variables

jsregexp.h File Reference

#include <stddef.h>
#include "jspubtd.h"
#include "jsstr.h"
#include "jsdhash.h"
Include dependency graph for jsregexp.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  JSRegExpStatics
struct  RECharSet
struct  JSRegExp

Defines

#define REGEXP_PAREN_SUBSTRING(res, num)
#define HOLD_REGEXP(cx, re)   JS_ATOMIC_INCREMENT(&(re)->nrefs)
#define DROP_REGEXP(cx, re)   js_DestroyRegExp(cx, re)
#define VALUE_IS_REGEXP(cx, v)   (!JSVAL_IS_PRIMITIVE(v) && JSVAL_TO_OBJECT(v)->isRegExp())

Typedefs

typedef struct RECharSet RECharSet
typedef struct RENode RENode

Enumerations

enum  regexp_tinyid {
  REGEXP_SOURCE = -1, REGEXP_GLOBAL = -2, REGEXP_IGNORE_CASE = -3, REGEXP_LAST_INDEX = -4,
  REGEXP_MULTILINE = -5, REGEXP_STICKY = -6
}

Functions

void js_SaveAndClearRegExpStatics (JSContext *cx, JSRegExpStatics *statics, JSTempValueRooter *tvr)
void js_RestoreRegExpStatics (JSContext *cx, JSRegExpStatics *statics, JSTempValueRooter *tvr)
JSRegExpjs_NewRegExp (JSContext *cx, JSTokenStream *ts, JSString *str, uintN flags, JSBool flat)
JSRegExpjs_NewRegExpOpt (JSContext *cx, JSString *str, JSString *opt, JSBool flat)
void js_DestroyRegExp (JSContext *cx, JSRegExp *re)
JSBool js_ExecuteRegExp (JSContext *cx, JSRegExp *re, JSString *str, size_t *indexp, JSBool test, jsval *rval)
void js_InitRegExpStatics (JSContext *cx)
void js_TraceRegExpStatics (JSTracer *trc, JSContext *acx)
void js_FreeRegExpStatics (JSContext *cx)
JSObjectjs_InitRegExpClass (JSContext *cx, JSObject *obj)
JSBool js_regexp_toString (JSContext *cx, JSObject *obj, jsval *vp)
JSObjectjs_NewRegExpObject (JSContext *cx, JSTokenStream *ts, jschar *chars, size_t length, uintN flags)
JSBool js_XDRRegExpObject (JSXDRState *xdr, JSObject **objp)
JSObjectjs_CloneRegExpObject (JSContext *cx, JSObject *obj, JSObject *parent)
bool js_ContainsRegExpMetaChars (const jschar *chars, size_t length)

Variables

JSClass js_RegExpClass
const uint32 JSSLOT_REGEXP_LAST_INDEX = JSSLOT_PRIVATE + 1
const uint32 REGEXP_CLASS_FIXED_RESERVED_SLOTS = 1

Define Documentation

#define DROP_REGEXP (   cx,
  re 
)    js_DestroyRegExp(cx, re)
#define HOLD_REGEXP (   cx,
  re 
)    JS_ATOMIC_INCREMENT(&(re)->nrefs)
#define REGEXP_PAREN_SUBSTRING (   res,
  num 
)
Value:
(((jsuint)(num) < (jsuint)(res)->parenCount)                              \
     ? ((jsuint)(num) < 9)                                                    \
       ? &(res)->parens[num]                                                  \
       : &(res)->moreParens[(num) - 9]                                        \
     : &js_EmptySubString)
#define VALUE_IS_REGEXP (   cx,
  v 
)    (!JSVAL_IS_PRIMITIVE(v) && JSVAL_TO_OBJECT(v)->isRegExp())

Typedef Documentation

typedef struct RECharSet RECharSet
typedef struct RENode RENode

Enumeration Type Documentation

Enumerator:
REGEXP_SOURCE 
REGEXP_GLOBAL 
REGEXP_IGNORE_CASE 
REGEXP_LAST_INDEX 
REGEXP_MULTILINE 
REGEXP_STICKY 

Function Documentation

JSObject* js_CloneRegExpObject ( JSContext cx,
JSObject obj,
JSObject parent 
)
bool js_ContainsRegExpMetaChars ( const jschar chars,
size_t  length 
)
void js_DestroyRegExp ( JSContext cx,
JSRegExp re 
)
JSBool js_ExecuteRegExp ( JSContext cx,
JSRegExp re,
JSString str,
size_t *  indexp,
JSBool  test,
jsval rval 
)
void js_FreeRegExpStatics ( JSContext cx  ) 
JSObject* js_InitRegExpClass ( JSContext cx,
JSObject obj 
)
void js_InitRegExpStatics ( JSContext cx  ) 
JSRegExp* js_NewRegExp ( JSContext cx,
JSTokenStream ts,
JSString str,
uintN  flags,
JSBool  flat 
)
JSObject* js_NewRegExpObject ( JSContext cx,
JSTokenStream ts,
jschar chars,
size_t  length,
uintN  flags 
)
JSRegExp* js_NewRegExpOpt ( JSContext cx,
JSString str,
JSString opt,
JSBool  flat 
)
JSBool js_regexp_toString ( JSContext cx,
JSObject obj,
jsval vp 
)
void js_RestoreRegExpStatics ( JSContext cx,
JSRegExpStatics statics,
JSTempValueRooter tvr 
)
void js_SaveAndClearRegExpStatics ( JSContext cx,
JSRegExpStatics statics,
JSTempValueRooter tvr 
)
void js_TraceRegExpStatics ( JSTracer trc,
JSContext acx 
)
JSBool js_XDRRegExpObject ( JSXDRState xdr,
JSObject **  objp 
)

Variable Documentation