Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
soar
提交
1b663e78
S
soar
项目概览
Xiaomi
/
soar
大约 1 年 前同步成功
通知
397
Star
8512
Fork
1328
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
soar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1b663e78
编写于
10月 30, 2018
作者:
martianzhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update vitess daily
上级
153c0c51
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
116 addition
and
100 deletion
+116
-100
vendor/vendor.json
vendor/vendor.json
+24
-24
vendor/vitess.io/vitess/go/sqltypes/arithmetic.go
vendor/vitess.io/vitess/go/sqltypes/arithmetic.go
+1
-1
vendor/vitess.io/vitess/go/vt/sqlparser/ast.go
vendor/vitess.io/vitess/go/vt/sqlparser/ast.go
+3
-0
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
+8
-8
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
+47
-47
vendor/vitess.io/vitess/go/vt/sqlparser/token.go
vendor/vitess.io/vitess/go/vt/sqlparser/token.go
+33
-20
未找到文件。
vendor/vendor.json
浏览文件 @
1b663e78
...
...
@@ -1016,68 +1016,68 @@
{
"checksumSHA1"
:
"w8FCRjH70gM6QttB9QrEh9Y1x64="
,
"path"
:
"vitess.io/vitess"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"aKn1oKcY74N8TRLm3Ayt7Q4bbI4="
,
"path"
:
"vitess.io/vitess/go/bytes2"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"JVCEN4UGRmg3TofIBdzZMZ3G0Ww="
,
"path"
:
"vitess.io/vitess/go/hack"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"
yApy/qZmEZrjMB7ksmSgQCVfQCw
="
,
"checksumSHA1"
:
"
e1WJ7vCnVrlQQQlc6n/FewCDMso
="
,
"path"
:
"vitess.io/vitess/go/sqltypes"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"ntFIQYkBS51G6y+FEkjFW40+HOU="
,
"path"
:
"vitess.io/vitess/go/vt/log"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"XozR8bmeSR5KTe/nlUJkpJY2HKI="
,
"path"
:
"vitess.io/vitess/go/vt/proto/query"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"OnWsUHLDKcO3spwH0jD55SvKD24="
,
"path"
:
"vitess.io/vitess/go/vt/proto/topodata"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"sBAuZ/itMR8U8qbK4yLHxkP6Cpc="
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtgate"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"pLWM+SPGZs3k+IhjktE/cGUlpM0="
,
"path"
:
"vitess.io/vitess/go/vt/proto/vtrpc"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"
az6gvy2kdu4o6RISiA1ox5VDncE
="
,
"checksumSHA1"
:
"
re3V8oX+ujxHbNZuB+QEtrcXxE8
="
,
"path"
:
"vitess.io/vitess/go/vt/sqlparser"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
},
{
"checksumSHA1"
:
"oF4XzuOzwvj1iduX/lYqNSyY/HM="
,
"path"
:
"vitess.io/vitess/go/vt/vterrors"
,
"revision"
:
"e
daead80d2579c241ae292c70a69d1f526ceeba8
"
,
"revisionTime"
:
"2018-10-29T
04:28:01
Z"
"revision"
:
"e
e89e01fd0f1e8d97911a845a1828cc1ca614c9e
"
,
"revisionTime"
:
"2018-10-29T
23:21:17
Z"
}
],
"rootPath"
:
"github.com/XiaoMi/soar"
...
...
vendor/vitess.io/vitess/go/sqltypes/arithmetic.go
浏览文件 @
1b663e78
...
...
@@ -198,7 +198,7 @@ func ToUint64(v Value) (uint64, error) {
panic
(
"unreachable"
)
}
// ToInt64 converts Value to
u
int64.
// ToInt64 converts Value to int64.
func
ToInt64
(
v
Value
)
(
int64
,
error
)
{
num
,
err
:=
newIntegralNumeric
(
v
)
if
err
!=
nil
{
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/ast.go
浏览文件 @
1b663e78
...
...
@@ -89,6 +89,9 @@ func Parse(sql string) (Statement, error) {
tokenizer
:=
NewStringTokenizer
(
sql
)
if
yyParsePooled
(
tokenizer
)
!=
0
{
if
tokenizer
.
partialDDL
!=
nil
{
if
typ
,
val
:=
tokenizer
.
Scan
();
typ
!=
0
{
return
nil
,
fmt
.
Errorf
(
"extra characters encountered after end of DDL: '%s'"
,
string
(
val
))
}
log
.
Warningf
(
"ignoring error parsing DDL '%s': %v"
,
sql
,
tokenizer
.
LastError
)
tokenizer
.
ParseTree
=
tokenizer
.
partialDDL
return
tokenizer
.
ParseTree
,
nil
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/sql.go
浏览文件 @
1b663e78
...
...
@@ -30,11 +30,11 @@ func decNesting(yylex interface{}) {
yylex
.
(
*
Tokenizer
)
.
nesting
--
}
//
forceEOF
forces the lexer to end prematurely. Not all SQL statements
// are supported by the Parser, thus calling
forceEOF
will make the lexer
//
skipToEnd
forces the lexer to end prematurely. Not all SQL statements
// are supported by the Parser, thus calling
skipToEnd
will make the lexer
// return EOF early.
func
forceEOF
(
yylex
interface
{})
{
yylex
.
(
*
Tokenizer
)
.
ForceEOF
=
true
func
skipToEnd
(
yylex
interface
{})
{
yylex
.
(
*
Tokenizer
)
.
SkipToEnd
=
true
}
//line sql.y:53
...
...
@@ -6450,25 +6450,25 @@ yydefault:
yyDollar
=
yyS
[
yypt
-
0
:
yypt
+
1
]
//line sql.y:3327
{
forceEOF
(
yylex
)
skipToEnd
(
yylex
)
}
case
832
:
yyDollar
=
yyS
[
yypt
-
0
:
yypt
+
1
]
//line sql.y:3332
{
forceEOF
(
yylex
)
skipToEnd
(
yylex
)
}
case
833
:
yyDollar
=
yyS
[
yypt
-
1
:
yypt
+
1
]
//line sql.y:3336
{
forceEOF
(
yylex
)
skipToEnd
(
yylex
)
}
case
834
:
yyDollar
=
yyS
[
yypt
-
1
:
yypt
+
1
]
//line sql.y:3340
{
forceEOF
(
yylex
)
skipToEnd
(
yylex
)
}
}
goto
yystack
/* stack new state and value */
...
...
vendor/vitess.io/vitess/go/vt/sqlparser/sql.y
浏览文件 @
1b663e78
...
...
@@ -41,11 +41,11 @@ func decNesting(yylex interface{}) {
yylex
.(*
Tokenizer
).
nesting
--
}
//
forceEOF
forces
the
lexer
to
end
prematurely
.
Not
all
SQL
statements
//
are
supported
by
the
Parser
,
thus
calling
forceEOF
will
make
the
lexer
//
skipToEnd
forces
the
lexer
to
end
prematurely
.
Not
all
SQL
statements
//
are
supported
by
the
Parser
,
thus
calling
skipToEnd
will
make
the
lexer
//
return
EOF
early
.
func
forceEOF
(
yylex
interface
{})
{
yylex
.(*
Tokenizer
).
ForceEOF
=
true
func
skipToEnd
(
yylex
interface
{})
{
yylex
.(*
Tokenizer
).
SkipToEnd
=
true
}
%}
...
...
@@ -267,7 +267,7 @@ func forceEOF(yylex interface{}) {
%type <expr> charset_value
%type <tableIdent> table_id reserved_table_id table_alias as_opt_id
%type <empty> as_opt
%type <empty>
force_eof ddl_force_eof
%type <empty>
skip_to_end ddl_skip_to_end
%type <str> charset
%type <str> set_session_or_global show_session_or_global
%type <convertType> convert_type
...
...
@@ -557,16 +557,16 @@ create_statement:
$1.OptLike = $2
$$ = $1
}
| CREATE constraint_opt INDEX ID using_opt ON table_name ddl_
force_eof
| CREATE constraint_opt INDEX ID using_opt ON table_name ddl_
skip_to_end
{
// Change this to an alter statement
$$ = &DDL{Action: AlterStr, Table: $7, NewName:$7}
}
| CREATE VIEW table_name ddl_
force_eof
| CREATE VIEW table_name ddl_
skip_to_end
{
$$ = &DDL{Action: CreateStr, NewName: $3.ToViewName()}
}
| CREATE OR REPLACE VIEW table_name ddl_
force_eof
| CREATE OR REPLACE VIEW table_name ddl_
skip_to_end
{
$$ = &DDL{Action: CreateStr, NewName: $5.ToViewName()}
}
...
...
@@ -578,11 +578,11 @@ create_statement:
Params: $5,
}}
}
| CREATE DATABASE not_exists_opt ID ddl_
force_eof
| CREATE DATABASE not_exists_opt ID ddl_
skip_to_end
{
$$ = &DBDDL{Action: CreateStr, DBName: string($4)}
}
| CREATE SCHEMA not_exists_opt ID ddl_
force_eof
| CREATE SCHEMA not_exists_opt ID ddl_
skip_to_end
{
$$ = &DBDDL{Action: CreateStr, DBName: string($4)}
}
...
...
@@ -1288,15 +1288,15 @@ table_opt_value:
}
alter_statement:
ALTER ignore_opt TABLE table_name non_add_drop_or_rename_operation
force_eof
ALTER ignore_opt TABLE table_name non_add_drop_or_rename_operation
skip_to_end
{
$$ = &DDL{Action: AlterStr, Table: $4, NewName: $4}
}
| ALTER ignore_opt TABLE table_name ADD alter_object_type
force_eof
| ALTER ignore_opt TABLE table_name ADD alter_object_type
skip_to_end
{
$$ = &DDL{Action: AlterStr, Table: $4, NewName: $4}
}
| ALTER ignore_opt TABLE table_name DROP alter_object_type
force_eof
| ALTER ignore_opt TABLE table_name DROP alter_object_type
skip_to_end
{
$$ = &DDL{Action: AlterStr, Table: $4, NewName: $4}
}
...
...
@@ -1328,12 +1328,12 @@ alter_statement:
// Change this to a rename statement
$$ = &DDL{Action: RenameStr, Table: $4, NewName: $7}
}
| ALTER ignore_opt TABLE table_name RENAME index_opt
force_eof
| ALTER ignore_opt TABLE table_name RENAME index_opt
skip_to_end
{
// Rename an index can just be an alter
$$ = &DDL{Action: AlterStr, Table: $4, NewName: $4}
}
| ALTER VIEW table_name ddl_
force_eof
| ALTER VIEW table_name ddl_
skip_to_end
{
$$ = &DDL{Action: AlterStr, Table: $3.ToViewName(), NewName: $3.ToViewName()}
}
...
...
@@ -1396,12 +1396,12 @@ drop_statement:
}
$$ = &DDL{Action: DropStr, Table: $4, IfExists: exists}
}
| DROP INDEX ID ON table_name ddl_
force_eof
| DROP INDEX ID ON table_name ddl_
skip_to_end
{
// Change this to an alter statement
$$ = &DDL{Action: AlterStr, Table: $5, NewName: $5}
}
| DROP VIEW exists_opt table_name ddl_
force_eof
| DROP VIEW exists_opt table_name ddl_
skip_to_end
{
var exists bool
if $3 != 0 {
...
...
@@ -1434,60 +1434,60 @@ analyze_statement:
}
show_statement:
SHOW BINARY ID ddl_
force_eof
/* SHOW BINARY LOGS */
SHOW BINARY ID ddl_
skip_to_end
/* SHOW BINARY LOGS */
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
| SHOW CHARACTER SET ddl_
force_eof
| SHOW CHARACTER SET ddl_
skip_to_end
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
| SHOW CREATE DATABASE ddl_
force_eof
| SHOW CREATE DATABASE ddl_
skip_to_end
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
/* Rule to handle SHOW CREATE EVENT, SHOW CREATE FUNCTION, etc. */
| SHOW CREATE ID ddl_
force_eof
| SHOW CREATE ID ddl_
skip_to_end
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
| SHOW CREATE PROCEDURE ddl_
force_eof
| SHOW CREATE PROCEDURE ddl_
skip_to_end
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
| SHOW CREATE TABLE ddl_
force_eof
| SHOW CREATE TABLE ddl_
skip_to_end
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
| SHOW CREATE TRIGGER ddl_
force_eof
| SHOW CREATE TRIGGER ddl_
skip_to_end
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
| SHOW CREATE VIEW ddl_
force_eof
| SHOW CREATE VIEW ddl_
skip_to_end
{
$$ = &Show{Type: string($2) + " " + string($3)}
}
| SHOW DATABASES ddl_
force_eof
| SHOW DATABASES ddl_
skip_to_end
{
$$ = &Show{Type: string($2)}
}
| SHOW INDEX ddl_
force_eof
| SHOW INDEX ddl_
skip_to_end
{
$$ = &Show{Type: string($2)}
}
| SHOW KEYS ddl_
force_eof
| SHOW KEYS ddl_
skip_to_end
{
$$ = &Show{Type: string($2)}
}
| SHOW PROCEDURE ddl_
force_eof
| SHOW PROCEDURE ddl_
skip_to_end
{
$$ = &Show{Type: string($2)}
}
| SHOW show_session_or_global STATUS ddl_
force_eof
| SHOW show_session_or_global STATUS ddl_
skip_to_end
{
$$ = &Show{Scope: $2, Type: string($3)}
}
| SHOW TABLE ddl_
force_eof
| SHOW TABLE ddl_
skip_to_end
{
$$ = &Show{Type: string($2)}
}
...
...
@@ -1506,7 +1506,7 @@ show_statement:
$$
=
&
Show
{
Type
:
$
3
,
ShowTablesOpt
:
showTablesOpt
}
}
}
|
SHOW
show_session_or_global
VARIABLES
ddl_
force_eof
|
SHOW
show_session_or_global
VARIABLES
ddl_
skip_to_end
{
$$
=
&
Show
{
Scope
:
$
2
,
Type
:
string
($
3
)}
}
...
...
@@ -1558,7 +1558,7 @@ show_statement:
*
SHOW
BINARY
LOGS
*
SHOW
INVALID
*/
|
SHOW
ID
ddl_
force_eof
|
SHOW
ID
ddl_
skip_to_end
{
$$
=
&
Show
{
Type
:
string
($
2
)}
}
...
...
@@ -1668,37 +1668,37 @@ rollback_statement:
}
other_statement
:
DESC
force_eof
DESC
skip_to_end
{
$$
=
&
OtherRead
{}
}
|
DESCRIBE
force_eof
|
DESCRIBE
skip_to_end
{
$$
=
&
OtherRead
{}
}
|
EXPLAIN
force_eof
|
EXPLAIN
skip_to_end
{
$$
=
&
OtherRead
{}
}
|
REPAIR
force_eof
|
REPAIR
skip_to_end
{
$$
=
&
OtherAdmin
{}
}
|
OPTIMIZE
force_eof
|
OPTIMIZE
skip_to_end
{
$$
=
&
OtherAdmin
{}
}
|
LOCK
TABLES
force_eof
|
LOCK
TABLES
skip_to_end
{
$$
=
&
OtherAdmin
{}
}
|
UNLOCK
TABLES
force_eof
|
UNLOCK
TABLES
skip_to_end
{
$$
=
&
OtherAdmin
{}
}
flush_statement
:
FLUSH
force_eof
FLUSH
skip_to_end
{
$$
=
&
DDL
{
Action
:
FlushStr
}
}
...
...
@@ -3323,20 +3323,20 @@ closeb:
decNesting(yylex)
}
force_eof
:
skip_to_end
:
{
forceEOF
(yylex)
skipToEnd
(yylex)
}
ddl_
force_eof
:
ddl_
skip_to_end
:
{
forceEOF
(yylex)
skipToEnd
(yylex)
}
| openb
{
forceEOF
(yylex)
skipToEnd
(yylex)
}
| reserved_sql_id
{
forceEOF
(yylex)
skipToEnd
(yylex)
}
vendor/vitess.io/vitess/go/vt/sqlparser/token.go
浏览文件 @
1b663e78
...
...
@@ -37,7 +37,7 @@ type Tokenizer struct {
InStream
io
.
Reader
AllowComments
bool
SkipSpecialComments
bool
ForceEOF
bool
SkipToEnd
bool
lastChar
uint16
Position
int
lastToken
[]
byte
...
...
@@ -428,6 +428,10 @@ func KeywordString(id int) string {
// Lex returns the next token form the Tokenizer.
// This function is used by go yacc.
func
(
tkn
*
Tokenizer
)
Lex
(
lval
*
yySymType
)
int
{
if
tkn
.
SkipToEnd
{
return
tkn
.
skipStatement
()
}
typ
,
val
:=
tkn
.
Scan
()
for
typ
==
COMMENT
{
if
tkn
.
AllowComments
{
...
...
@@ -435,6 +439,13 @@ func (tkn *Tokenizer) Lex(lval *yySymType) int {
}
typ
,
val
=
tkn
.
Scan
()
}
if
typ
==
0
||
typ
==
';'
||
typ
==
LEX_ERROR
{
// If encounter end of statement or invalid token,
// we should not accept partially parsed DDLs. They
// should instead result in parser errors. See the
// Parse function to see how this is handled.
tkn
.
partialDDL
=
nil
}
lval
.
bytes
=
val
tkn
.
lastToken
=
val
return
typ
...
...
@@ -451,9 +462,7 @@ func (tkn *Tokenizer) Error(err string) {
tkn
.
LastError
=
errors
.
New
(
buf
.
String
())
// Try and re-sync to the next statement
if
tkn
.
lastChar
!=
';'
{
tkn
.
skipStatement
()
}
}
// Scan scans the tokenizer for the next token and returns
...
...
@@ -475,11 +484,6 @@ func (tkn *Tokenizer) Scan() (int, []byte) {
tkn
.
next
()
}
if
tkn
.
ForceEOF
{
tkn
.
skipStatement
()
return
0
,
nil
}
tkn
.
skipBlank
()
switch
ch
:=
tkn
.
lastChar
;
{
case
isLetter
(
ch
)
:
...
...
@@ -505,14 +509,21 @@ func (tkn *Tokenizer) Scan() (int, []byte) {
return
tkn
.
scanNumber
(
false
)
case
ch
==
':'
:
return
tkn
.
scanBindVar
()
case
ch
==
';'
&&
tkn
.
multi
:
case
ch
==
';'
:
if
tkn
.
multi
{
// In multi mode, ';' is treated as EOF. So, we don't advance.
// Repeated calls to Scan will keep returning 0 until ParseNext
// forces the advance.
return
0
,
nil
}
tkn
.
next
()
return
';'
,
nil
case
ch
==
eofChar
:
return
0
,
nil
default
:
tkn
.
next
()
switch
ch
{
case
eofChar
:
return
0
,
nil
case
'='
,
','
,
';'
,
'('
,
')'
,
'+'
,
'*'
,
'%'
,
'^'
,
'~'
:
case
'='
,
','
,
'('
,
')'
,
'+'
,
'*'
,
'%'
,
'^'
,
'~'
:
return
int
(
ch
),
nil
case
'&'
:
if
tkn
.
lastChar
==
'&'
{
...
...
@@ -613,12 +624,14 @@ func (tkn *Tokenizer) Scan() (int, []byte) {
}
}
// skipStatement scans until the EOF, or end of statement is encountered.
func
(
tkn
*
Tokenizer
)
skipStatement
()
{
ch
:=
tkn
.
lastChar
for
ch
!=
';'
&&
ch
!=
eofChar
{
tkn
.
next
()
ch
=
tkn
.
lastChar
// skipStatement scans until end of statement.
func
(
tkn
*
Tokenizer
)
skipStatement
()
int
{
tkn
.
SkipToEnd
=
false
for
{
typ
,
_
:=
tkn
.
Scan
()
if
typ
==
0
||
typ
==
';'
||
typ
==
LEX_ERROR
{
return
typ
}
}
}
...
...
@@ -930,7 +943,7 @@ func (tkn *Tokenizer) reset() {
tkn
.
specialComment
=
nil
tkn
.
posVarIndex
=
0
tkn
.
nesting
=
0
tkn
.
ForceEOF
=
false
tkn
.
SkipToEnd
=
false
}
func
isLetter
(
ch
uint16
)
bool
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录