diff options
Diffstat (limited to 'libphobos/src/std/regex')
-rw-r--r-- | libphobos/src/std/regex/internal/backtracking.d | 4 | ||||
-rw-r--r-- | libphobos/src/std/regex/internal/parser.d | 2 | ||||
-rw-r--r-- | libphobos/src/std/regex/internal/thompson.d | 18 | ||||
-rw-r--r-- | libphobos/src/std/regex/package.d | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/libphobos/src/std/regex/internal/backtracking.d b/libphobos/src/std/regex/internal/backtracking.d index a488e06..605ec03 100644 --- a/libphobos/src/std/regex/internal/backtracking.d +++ b/libphobos/src/std/regex/internal/backtracking.d @@ -702,7 +702,7 @@ final: } void stackPush(T)(T val) - if (!isDynamicArray!T) + if (!isDynamicArray!T) { *cast(T*)&memory[lastState] = val; enum delta = (T.sizeof+size_t.sizeof/2)/size_t.sizeof; @@ -720,7 +720,7 @@ final: } void stackPop(T)(ref T val) - if (!isDynamicArray!T) + if (!isDynamicArray!T) { enum delta = (T.sizeof+size_t.sizeof/2)/size_t.sizeof; lastState -= delta; diff --git a/libphobos/src/std/regex/internal/parser.d b/libphobos/src/std/regex/internal/parser.d index ab2b297..d8ebe59 100644 --- a/libphobos/src/std/regex/internal/parser.d +++ b/libphobos/src/std/regex/internal/parser.d @@ -542,7 +542,7 @@ if (isForwardRange!R && is(ElementType!R : dchar)) Generator g; @trusted this(S)(R pattern, S flags) - if (isSomeString!S) + if (isSomeString!S) { pat = origin = pattern; //reserve slightly more then avg as sampled from unittests diff --git a/libphobos/src/std/regex/internal/thompson.d b/libphobos/src/std/regex/internal/thompson.d index f4643ae..195625f 100644 --- a/libphobos/src/std/regex/internal/thompson.d +++ b/libphobos/src/std/regex/internal/thompson.d @@ -276,7 +276,7 @@ template ThompsonOps(E, S, bool withInput:true) } static bool op(IR code)(E e, S* state) - if (code == IR.RepeatEnd || code == IR.RepeatQEnd) + if (code == IR.RepeatEnd || code == IR.RepeatQEnd) { with(e) with(state) { @@ -331,7 +331,7 @@ template ThompsonOps(E, S, bool withInput:true) } static bool op(IR code)(E e, S* state) - if (code == IR.InfiniteEnd || code == IR.InfiniteQEnd) + if (code == IR.InfiniteEnd || code == IR.InfiniteQEnd) { with(e) with(state) { @@ -366,7 +366,7 @@ template ThompsonOps(E, S, bool withInput:true) } static bool op(IR code)(E e, S* state) - if (code == IR.InfiniteBloomEnd) + if (code == IR.InfiniteBloomEnd) { with(e) with(state) { @@ -507,7 +507,7 @@ template ThompsonOps(E, S, bool withInput:true) static bool op(IR code)(E e, S* state) - if (code == IR.LookbehindStart || code == IR.NeglookbehindStart) + if (code == IR.LookbehindStart || code == IR.NeglookbehindStart) { with(e) with(state) { @@ -534,7 +534,7 @@ template ThompsonOps(E, S, bool withInput:true) } static bool op(IR code)(E e, S* state) - if (code == IR.LookaheadStart || code == IR.NeglookaheadStart) + if (code == IR.LookaheadStart || code == IR.NeglookaheadStart) { with(e) with(state) { @@ -563,8 +563,8 @@ template ThompsonOps(E, S, bool withInput:true) } static bool op(IR code)(E e, S* state) - if (code == IR.LookaheadEnd || code == IR.NeglookaheadEnd || - code == IR.LookbehindEnd || code == IR.NeglookbehindEnd) + if (code == IR.LookaheadEnd || code == IR.NeglookaheadEnd || + code == IR.LookbehindEnd || code == IR.NeglookbehindEnd) { with(e) with(state) { @@ -675,7 +675,7 @@ template ThompsonOps(E,S, bool withInput:false) @trusted: // can't match these without input static bool op(IR code)(E e, S* state) - if (code == IR.Char || code == IR.OrChar || code == IR.CodepointSet + if (code == IR.Char || code == IR.OrChar || code == IR.CodepointSet || code == IR.Trie || code == IR.Char || code == IR.Any) { return state.popState(e); @@ -701,7 +701,7 @@ template ThompsonOps(E,S, bool withInput:false) // forward all control flow to normal versions static bool op(IR code)(E e, S* state) - if (code != IR.Char && code != IR.OrChar && code != IR.CodepointSet + if (code != IR.Char && code != IR.OrChar && code != IR.CodepointSet && code != IR.Trie && code != IR.Char && code != IR.Any && code != IR.Backref) { return ThompsonOps!(E,S,true).op!code(e,state); diff --git a/libphobos/src/std/regex/package.d b/libphobos/src/std/regex/package.d index d6a01e2..143b683 100644 --- a/libphobos/src/std/regex/package.d +++ b/libphobos/src/std/regex/package.d @@ -688,7 +688,7 @@ public: ---- +/ R opIndex(String)(String i) /*const*/ //@@@BUG@@@ - if (isSomeString!String) + if (isSomeString!String) { size_t index = lookupNamedGroup(_names, i); return getMatch(index); |