FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daScript/daslib/stringify.das at master · Shekn/daScript · GitHub
Shekn
/
daScript
Public
forked from
GaijinEntertainment/daScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
daScript
/
daslib
/
stringify.das
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (25 loc) · 1.02 KB
Breadcrumbs
daScript
/
daslib
/
stringify.das
Copy path
File metadata and controls
28 lines (25 loc) · 1.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
options
no_unused_block_arguments
=
false
options
no_unused_function_arguments
=
false
options
indenting
=
4
options
strict_smart_pointers
=
true
module
stringify
shared
public
require
strings
require
daslib
/
ast_boost
[
reader_macro
(
name
=
"stringify"
)]
class
private
LongStringReader
:
AstReaderMacro
//! This macro implements embedding of the long string into the source code.
//! var st = %stringify~
//! This is a long string
//! with multiple lines
//! and special charactes like { this } and "that"
//! %%
def
override
accept
(
prog
:
ProgramPtr
;
mod
:
Module
?;
var
expr
:
ExprReader
?;
ch
:
int
;
info
:
LineInfo
) :
bool
append(expr.sequence,ch)
if ends_with(expr.sequence,"%%")
let
len
=
length
(
expr
.
sequence
)
resize(expr.sequence,len-2)
return false
else
return true
def
override
visit
(
prog
:
ProgramPtr
;
mod
:
Module
?;
expr
:
smart_ptr
<
ExprReader
>
) :
ExpressionPtr
return <- new [[ExprConstString() at=expr.at, value:=expr.sequence]]
Back
|
FazBrowse Home
|
New Git URL