Skip to content

Commit

Permalink
Merge pull request #1347 from blackwhale/new-std-uni
Browse files Browse the repository at this point in the history
New std.uni module
  • Loading branch information
jmdavis committed Aug 8, 2013
2 parents fde2d19 + 9a053d9 commit c109594
Show file tree
Hide file tree
Showing 8 changed files with 12,956 additions and 2,658 deletions.
2 changes: 1 addition & 1 deletion posix.mak
Expand Up @@ -202,7 +202,7 @@ EXTRA_MODULES += $(EXTRA_DOCUMENTABLES) $(addprefix \
std/internal/digest/, sha_SSSE3 ) $(addprefix \
std/internal/math/, biguintcore biguintnoasm biguintx86 \
gammafunction errorfunction) $(addprefix std/internal/, \
processinit uni uni_tab)
processinit uni uni_tab unicode_tables)

# Aggregate all D modules relevant to this build
D_MODULES = crc32 $(STD_MODULES) $(EXTRA_MODULES) $(STD_NET_MODULES) $(STD_DIGEST_MODULES)
Expand Down
5,777 changes: 5,777 additions & 0 deletions std/internal/unicode_tables.d

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion std/json.d
Expand Up @@ -596,7 +596,8 @@ unittest
val = parseJSON(`"\u2660\u2666"`);
assert(toJSON(&val) == "\"\♠\♦\"");

assertNotThrown(parseJSON(`{ "foo": "` ~ "\u007F" ~ `"}`));
//0x7F is a control character (see Unicode spec)
assertThrown(parseJSON(`{ "foo": "` ~ "\u007F" ~ `"}`));

with(parseJSON(`""`))
assert(str == "" && str !is null);
Expand Down
6 changes: 5 additions & 1 deletion std/regex.d
Expand Up @@ -225,15 +225,19 @@ module std.regex;
import std.internal.uni, std.internal.uni_tab;//unicode property tables
import std.array, std.algorithm, std.range,
std.conv, std.exception, std.traits, std.typetuple,
std.uni, std.utf, std.format, std.typecons, std.bitmanip,
std.utf, std.format, std.typecons, std.bitmanip,
std.functional, std.exception;

import core.bitop, core.stdc.string, core.stdc.stdlib;
static import ascii = std.ascii;
import std.string : representation;

debug import std.stdio;

private:

import std.uni : isAlpha, isWhite;

@safe:

//uncomment to get a barrage of debug info
Expand Down

0 comments on commit c109594

Please sign in to comment.