-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into truncated-raw-string
- Loading branch information
Showing
15 changed files
with
116 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> { | ||
str := <span class="hljs-string">"Hello, 世界\nHello \"world\"\nHello 'world'"</span> | ||
char := <span class="hljs-string">'a'</span> | ||
char2 := <span class="hljs-string">'"'</span> | ||
char3 := <span class="hljs-string">'\\'</span> | ||
char3 := <span class="hljs-string">'\''</span> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
func main() { | ||
str := "Hello, 世界\nHello \"world\"\nHello 'world'" | ||
char := 'a' | ||
char2 := '"' | ||
char3 := '\\' | ||
char3 := '\'' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string"><iostream></span></span> | ||
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> foo 1<<16</span> | ||
|
||
<span class="hljs-meta">#<span class="hljs-meta-keyword">ifdef</span> DEBUG</span> | ||
TYPE1 foo(<span class="hljs-keyword">void</span>) | ||
<span class="hljs-meta">#<span class="hljs-meta-keyword">else</span></span> | ||
<span class="hljs-keyword">int</span> foo(<span class="hljs-keyword">void</span>) | ||
<span class="hljs-meta">#<span class="hljs-meta-keyword">endif</span></span> | ||
{ } | ||
|
||
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> x(v) ((v))</span> | ||
<span class="hljs-meta"># <span class="hljs-meta-keyword">define</span> x(v) ((v))</span> | ||
<span class="hljs-meta"># <span class="hljs-meta-keyword">define</span> x(v) ((v))</span> | ||
|
||
<span class="hljs-meta">#<span class="hljs-meta-keyword">if</span> MACRO_WITH_STRING_ARG(<span class="hljs-meta-string">"hello \"world\""</span>)</span> | ||
<span class="hljs-meta">#<span class="hljs-meta-keyword">elif</span> MULTI_LINE <span class="hljs-comment">/* comment */</span> < \ | ||
EXPRESSION</span> | ||
<span class="hljs-keyword">int</span> bar; | ||
<span class="hljs-meta">#<span class="hljs-meta-keyword">endif</span> <span class="hljs-comment">// comment</span></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <iostream> | ||
#define foo 1<<16 | ||
|
||
#ifdef DEBUG | ||
TYPE1 foo(void) | ||
#else | ||
int foo(void) | ||
#endif | ||
{ } | ||
|
||
#define x(v) ((v)) | ||
# define x(v) ((v)) | ||
# define x(v) ((v)) | ||
|
||
#if MACRO_WITH_STRING_ARG("hello \"world\"") | ||
#elif MULTI_LINE /* comment */ < \ | ||
EXPRESSION | ||
int bar; | ||
#endif // comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<span class="hljs-keyword">const</span> <span class="hljs-keyword">char</span> *str = <span class="hljs-string">"Regular \"quoted\" string\n"</span>; | ||
<span class="hljs-built_in">NSString</span> *nsstr = <span class="hljs-string">@"Obj-C \"quoted\" string\n"</span>; | ||
<span class="hljs-keyword">char</span> c = <span class="hljs-string">'c'</span>; | ||
<span class="hljs-keyword">char</span> c2 = <span class="hljs-string">'"'</span>; | ||
<span class="hljs-keyword">char</span> c3 = <span class="hljs-string">'\''</span>; | ||
<span class="hljs-keyword">char</span> c4 = <span class="hljs-string">'\n'</span>; | ||
<span class="hljs-keyword">int</span> multibyte_char = <span class="hljs-string">'abcd'</span>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const char *str = "Regular \"quoted\" string\n"; | ||
NSString *nsstr = @"Obj-C \"quoted\" string\n"; | ||
char c = 'c'; | ||
char c2 = '"'; | ||
char c3 = '\''; | ||
char c4 = '\n'; | ||
int multibyte_char = 'abcd'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters