Skip to content

Commit

Permalink
fix Issue 6971 - [lex.dd] Type of string literals are outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jan 24, 2012
1 parent 499eafa commit 7c7f80e
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions lex.dd
Original file line number Diff line number Diff line change
Expand Up @@ -487,17 +487,26 @@ $(V1 \x61"bc")
to the postfix characters are:
)

$(V1
$(TABLE2 String Literal Postfix Characters,
$(THEAD Postfix, Type)
$(TROW $(B c), $(CODE char[]))
$(TROW $(B w), $(CODE wchar[]))
$(TROW $(B d), $(CODE dchar[]))
$(THEAD Postfix, Type, Aka)
$(TROW $(B c), $(D char[]), $(D string))
$(TROW $(B w), $(D wchar[]), $(D wstring))
$(TROW $(B d), $(D dchar[]), $(D dstring))
)

)
$(V2
$(TABLE2 String Literal Postfix Characters,
$(THEAD Postfix, Type, Aka)
$(TROW $(B c), $(D immutable(char)[]), $(D string))
$(TROW $(B w), $(D immutable(wchar)[]), $(D wstring))
$(TROW $(B d), $(D immutable(dchar)[]), $(D dstring))
)
)
---
"hello"c // char[]
"hello"w // wchar[]
"hello"d // dchar[]
"hello"c // string
"hello"w // wstring
"hello"d // dstring
---

$(P The string literals are assembled as UTF-8 char arrays,
Expand Down

0 comments on commit 7c7f80e

Please sign in to comment.