File tree Expand file tree Collapse file tree 8 files changed +54
-3
lines changed
Expand file tree Collapse file tree 8 files changed +54
-3
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ console.log(data.tokens)
7373 - ` #t `
7474 - ` #nt `
7575 - ` #rt `
76+ - ` #flush `
7677 - comments ` <#-- --> `
7778 - built-ins:
7879 - ` ?toUpperCase `
@@ -88,7 +89,6 @@ console.log(data.tokens)
8889 - ` #escape `
8990 - ` #noescape `
9091 - ` #fallback `
91- - ` #flush `
9292 - ` #nested `
9393 - ` #recurse `
9494 - ` #visit `
Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ enum NodeNames {
2929 Nt = 'Nt' ,
3030 Rt = 'Rt' ,
3131 T = 'T' ,
32+ Flush = 'Flush' ,
3233
3334 // Not supported
3435 // Escape = 'Escape',
3536 // NoEscape = 'NoEscape',
3637 // Visit = 'visit',
3738 // Recurse = 'Recurse',
38- // Flush = 'Flush',
3939 // Nested = 'Nested',
4040}
4141
Original file line number Diff line number Diff line change 1+ import NodeNames from '../../enum/NodeNames'
2+ import { IToken } from '../Tokens'
3+ import AbstractNode from './AbstractNode'
4+
5+ export default class IFlush extends AbstractNode {
6+ constructor ( token : IToken ) {
7+ super ( NodeNames . Flush , token )
8+ }
9+ }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const Directives : IDirectivesTypes = {
1717 // noescape: NodeNames.NoEscape,
1818 // fallback: NodeNames.Fallback,
1919 function : NodeNames . Function ,
20- // flush: NodeNames.Flush,
20+ flush : NodeNames . Flush ,
2121 global : NodeNames . Global ,
2222 import : NodeNames . Import ,
2323 local : NodeNames . Local ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import IBreak from '../types/Nodes/IBreak'
77import IComment from '../types/Nodes/IComment'
88import ICompress from '../types/Nodes/ICompress'
99import ICondition from '../types/Nodes/ICondition'
10+ import IFlush from '../types/Nodes/IFlush'
1011import IFunction from '../types/Nodes/IFunction'
1112import IGlobal from '../types/Nodes/IGlobal'
1213import IImport from '../types/Nodes/IImport'
@@ -146,6 +147,9 @@ const Nodes : INodes = {
146147 [ NodeNames . T ] ( token : IToken ) : IT {
147148 return new IT ( token )
148149 } ,
150+ [ NodeNames . Flush ] ( token : IToken ) : IFlush {
151+ return new IFlush ( token )
152+ } ,
149153}
150154
151155export default Nodes
Original file line number Diff line number Diff line change 1+ {
2+ "type" : " Program" ,
3+ "start" : 0 ,
4+ "end" : 10 ,
5+ "body" : [
6+ {
7+ "type" : " Flush" ,
8+ "start" : 0 ,
9+ "end" : 8
10+ },
11+ {
12+ "type" : " Text" ,
13+ "start" : 8 ,
14+ "end" : 10 ,
15+ "text" : " \n\n "
16+ }
17+ ]
18+ }
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "type" : " Directive" ,
4+ "start" : 0 ,
5+ "end" : 8 ,
6+ "startTag" : " <#" ,
7+ "endTag" : " >" ,
8+ "text" : " flush" ,
9+ "isClose" : false
10+ },
11+ {
12+ "type" : " Text" ,
13+ "start" : 8 ,
14+ "end" : 10 ,
15+ "text" : " \n\n " ,
16+ "isClose" : false
17+ }
18+ ]
Original file line number Diff line number Diff line change 1+ <#flush >
2+
You can’t perform that action at this time.
0 commit comments