Coverage Report
Generated on Fri, 15 Sep 2023 17:19:28 CST with gocov-html
Report Overview
github.com/gobatis/gobatis 59.5% 256/430
github.com/gobatis/gobatis/cast 47.0% 678/1444
github.com/gobatis/gobatis/driver/postgres 93.3% 14/15
github.com/gobatis/gobatis/dtd 0.0% 0/76
github.com/gobatis/gobatis/executor 45.8% 721/1574
github.com/gobatis/gobatis/parser/expr 43.4% 532/1226
github.com/gobatis/gobatis/parser/simplemath 52.6% 153/291
github.com/gobatis/gobatis/parser/structpath 45.2% 128/283
github.com/gobatis/gobatis/parser/xml 37.5% 178/475

This coverage report has been generated with the following command:

gocov test github.com/gobatis/gobatis github.com/gobatis/gobatis/cast github.com/gobatis/gobatis/driver/postgres github.com/gobatis/gobatis/dtd github.com/gobatis/gobatis/executor github.com/gobatis/gobatis/parser/expr github.com/gobatis/gobatis/parser/simplemath github.com/gobatis/gobatis/parser/structpath github.com/gobatis/gobatis/parser/xml | gocov-html 
Package Overview: github.com/gobatis/gobatis 59.5%

Please select a function to see what's left for testing.

DB.Affect(...) github.com/gobatis/gobatis/db.go 100.0% 3/3
DB.Debug(...) github.com/gobatis/gobatis/db.go 100.0% 3/3
returning.Raw(...) github.com/gobatis/gobatis/element.go 100.0% 2/2
exec.Raw(...) github.com/gobatis/gobatis/element.go 100.0% 2/2
DB.Scan(...) github.com/gobatis/gobatis/db.go 100.0% 2/2
where.Raw(...) github.com/gobatis/gobatis/element.go 100.0% 2/2
query.Raw(...) github.com/gobatis/gobatis/element.go 100.0% 2/2
onConflict.Raw(...) github.com/gobatis/gobatis/element.go 100.0% 2/2
DB.RowsAffected(...) github.com/gobatis/gobatis/db.go 100.0% 1/1
@434:65(...) github.com/gobatis/gobatis/db.go 100.0% 1/1
DB.addError(...) github.com/gobatis/gobatis/db.go 100.0% 1/1
DB.Close(...) github.com/gobatis/gobatis/db.go 100.0% 1/1
PagingScan(...) github.com/gobatis/gobatis/queryer.go 100.0% 1/1
Param(...) github.com/gobatis/gobatis/param.go 100.0% 1/1
DB.clone(...) github.com/gobatis/gobatis/db.go 100.0% 1/1
OnConflict(...) github.com/gobatis/gobatis/element.go 100.0% 1/1
Returning(...) github.com/gobatis/gobatis/element.go 100.0% 1/1
DB.Ping(...) github.com/gobatis/gobatis/db.go 100.0% 1/1
@370:10(...) github.com/gobatis/gobatis/db.go 100.0% 1/1
Where(...) github.com/gobatis/gobatis/element.go 100.0% 1/1
ParallelQuery.executor(...) github.com/gobatis/gobatis/queryer.go 88.9% 8/9
PagingQuery.executors(...) github.com/gobatis/gobatis/queryer.go 87.5% 14/16
@176:74(...) github.com/gobatis/gobatis/db.go 85.7% 6/7
Open(...) github.com/gobatis/gobatis/db.go 83.3% 5/6
DB.FetchQuery(...) github.com/gobatis/gobatis/db.go 81.8% 9/11
DB.Insert(...) github.com/gobatis/gobatis/db.go 80.0% 8/10
DB.Update(...) github.com/gobatis/gobatis/db.go 80.0% 8/10
DB.raw(...) github.com/gobatis/gobatis/db.go 80.0% 4/5
DB.ParallelQuery(...) github.com/gobatis/gobatis/db.go 75.0% 18/24
del.Raw(...) github.com/gobatis/gobatis/element.go 75.0% 15/20
DB.Delete(...) github.com/gobatis/gobatis/db.go 75.0% 6/8
DB.Exec(...) github.com/gobatis/gobatis/db.go 75.0% 6/8
DB.Query(...) github.com/gobatis/gobatis/db.go 71.4% 5/7
DB.InsertBatch(...) github.com/gobatis/gobatis/db.go 70.4% 19/27
update.Raw(...) github.com/gobatis/gobatis/element.go 70.0% 21/30
insert.Raw(...) github.com/gobatis/gobatis/element.go 68.2% 30/44
DB.PagingQuery(...) github.com/gobatis/gobatis/db.go 66.7% 4/6
DB.conn(...) github.com/gobatis/gobatis/db.go 66.7% 4/6
DB.context(...) github.com/gobatis/gobatis/db.go 66.7% 2/3
insertBatch.Raw(...) github.com/gobatis/gobatis/element.go 52.3% 23/44
@369:6(...) github.com/gobatis/gobatis/db.go 50.0% 3/6
DB.setExecutor(...) github.com/gobatis/gobatis/db.go 50.0% 2/4
@252:8(...) github.com/gobatis/gobatis/element.go 50.0% 1/2
@160:8(...) github.com/gobatis/gobatis/element.go 50.0% 1/2
DB.execute(...) github.com/gobatis/gobatis/db.go 44.4% 4/9
DB.Begin(...) github.com/gobatis/gobatis/db.go 0.0% 0/13
UseDB(...) github.com/gobatis/gobatis/db.go 0.0% 0/7
DB.Rollback(...) github.com/gobatis/gobatis/db.go 0.0% 0/6
DB.Commit(...) github.com/gobatis/gobatis/db.go 0.0% 0/6
DB.WithContext(...) github.com/gobatis/gobatis/db.go 0.0% 0/6
DB.WithTraceId(...) github.com/gobatis/gobatis/db.go 0.0% 0/6
selectColumns.Reflect(...) github.com/gobatis/gobatis/rows.go 0.0% 0/4
DB.Trace(...) github.com/gobatis/gobatis/db.go 0.0% 0/3
innerSQL.Raw(...) github.com/gobatis/gobatis/element.go 0.0% 0/2
@499:8(...) github.com/gobatis/gobatis/db.go 0.0% 0/2
@478:8(...) github.com/gobatis/gobatis/db.go 0.0% 0/2
DB.DB(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
WithDebug(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
fetch.Raw(...) github.com/gobatis/gobatis/element.go 0.0% 0/1
Config.Apply(...) github.com/gobatis/gobatis/config.go 0.0% 0/1
@446:8(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
newInnerSQL(...) github.com/gobatis/gobatis/element.go 0.0% 0/1
build.Raw(...) github.com/gobatis/gobatis/element.go 0.0% 0/1
@53:12(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
DB.LastInsertId(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
DB.AssociateQuery(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
LooseDest(...) github.com/gobatis/gobatis/param.go 0.0% 0/1
WithTraceId(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
WithTx(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
Config.AfterInitialize(...) github.com/gobatis/gobatis/config.go 0.0% 0/1
Select(...) github.com/gobatis/gobatis/rows.go 0.0% 0/1
Except(...) github.com/gobatis/gobatis/rows.go 0.0% 0/1
DB.Stats(...) github.com/gobatis/gobatis/db.go 0.0% 0/1
exceptColumns.Reflect(...) github.com/gobatis/gobatis/rows.go 0.0% 0/1
func DB.Affect
Back

In /Users/kun/gobatis/gobatis/db.go:

122
func (d *DB) Affect(v any) *DB {
123
        c := d.clone()
124
        c.affect = v
125
        return c
126
}
func DB.Debug
Back

In /Users/kun/gobatis/gobatis/db.go:

134
func (d *DB) Debug() *DB {
135
        c := d.clone()
136
        c.debug = true
137
        return c
138
}
func returning.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

422
func (r returning) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
423
        raw = &executor.Raw{
424
                SQL: fmt.Sprintf("returning %s", executor.TrimColumns(r.sql)),
425
        }
426
        return
427
}
func exec.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

403
func (e exec) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
404
        raw = &executor.Raw{
405
                SQL:    strings.TrimSpace(e.sql),
406
                Params: e.params,
407
        }
408
        return
409
}
func DB.Scan
Back

In /Users/kun/gobatis/gobatis/db.go:

223
func (d *DB) Scan(dest any) *DB {
224
        d.execute(dest)
225
        return d
226
}
func where.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

74
func (w where) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
75
        raw = &executor.Raw{
76
                SQL:    fmt.Sprintf("where %s", strings.TrimSpace(w.sql)),
77
                Params: w.params,
78
        }
79
        return
80
}
func query.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

389
func (q query) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
390
        raw = &executor.Raw{
391
                Query:  true,
392
                SQL:    q.sql,
393
                Params: q.params,
394
        }
395
        return
396
}
func onConflict.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

53
func (o onConflict) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
54
        raw = &executor.Raw{
55
                SQL:    fmt.Sprintf("on conflict(%s) %s", executor.TrimColumns(o.fields), o.sql),
56
                Params: o.params,
57
        }
58
        return
59
}
func DB.RowsAffected
Back

In /Users/kun/gobatis/gobatis/db.go:

400
func (d *DB) RowsAffected() (int64, error) {
401
        return d.rowsAffected, d.Error
402
}
func @434:65
Back

In /Users/kun/gobatis/gobatis/db.go:

434
func(s executor.Scanner) error {
435
                return query.Scan(s)
436
        }
func DB.addError
Back

In /Users/kun/gobatis/gobatis/db.go:

83
func (d *DB) addError(err error) {
84
        d.Error = executor.AddError(d.Error, err)
85
}
func DB.Close
Back

In /Users/kun/gobatis/gobatis/db.go:

140
func (d *DB) Close() error {
141
        return d.db.Close()
142
}
func PagingScan
Back

In /Users/kun/gobatis/gobatis/queryer.go:

43
func PagingScan(items any, count any) []any {
44
        return []any{items, count}
45
}
func Param
Back

In /Users/kun/gobatis/gobatis/param.go:

11
func Param(name string, value any) executor.Param {
12
        return executor.Param{Name: name, Value: value}
13
}
func DB.clone
Back

In /Users/kun/gobatis/gobatis/db.go:

87
func (d *DB) clone() *DB {
88
        return &DB{
89
                Config:   d.Config,
90
                Error:    d.Error,
91
                tx:       d.tx,
92
                ctx:      d.ctx,
93
                trace:    d.trace,
94
                debug:    d.debug,
95
                traceId:  d.traceId,
96
                affect:   d.affect,
97
                executed: d.executed,
98
                executor: nil,
99
        }
100
}
func OnConflict
Back

In /Users/kun/gobatis/gobatis/element.go:

61
func OnConflict(fields string, sql string, params ...executor.Param) Element {
62
        return &onConflict{
63
                fields: fields,
64
                sql:    sql,
65
                params: params,
66
        }
67
}
func Returning
Back

In /Users/kun/gobatis/gobatis/element.go:

429
func Returning(fields string) Element {
430
        return &returning{
431
                sql: fields,
432
        }
433
}
func DB.Ping
Back

In /Users/kun/gobatis/gobatis/db.go:

148
func (d *DB) Ping() error {
149
        return d.db.Ping()
150
}
func @370:10
Back

In /Users/kun/gobatis/gobatis/db.go:

370
func() {
371
                                wg.Done()
372
                        }
func Where
Back

In /Users/kun/gobatis/gobatis/element.go:

82
func Where(sql string, params ...executor.Param) Element {
83
        return &where{
84
                sql:    sql,
85
                params: params,
86
        }
87
}
func ParallelQuery.executor
Back

In /Users/kun/gobatis/gobatis/queryer.go:

20
func (q ParallelQuery) executor(namer dialector.Namer, tag string) (*executor.ParallelQuery, error) {
21
        if q.Scan == nil {
22
                return nil, fmt.Errorf("expect 1 scan dest; got nil")
23
        }
24
        var params []executor.Param
25
        for k, v := range q.Params {
26
                params = append(params, executor.Param{
27
                        Name:  k,
28
                        Value: v,
29
                })
30
        }
31
        raw := &executor.Raw{
32
                Ctx:    nil,
33
                Query:  true,
34
                SQL:    q.SQL,
35
                Params: nil,
36
        }
37
        for k, v := range q.Params {
38
                raw.Params = append(raw.Params, Param(k, v))
39
        }
40
        return &executor.ParallelQuery{Raw: raw, Dest: q.Scan}, nil
41
}
func PagingQuery.executors
Back

In /Users/kun/gobatis/gobatis/queryer.go:

60
func (p PagingQuery) executors(namer dialector.Namer, tag string) ([]ParallelQuery, error) {
61
        
62
        if p.Limit <= 0 {
63
                return nil, fmt.Errorf("invalid limit")
64
        }
65
        
66
        if l := len(p.Scan); l != 2 {
67
                return nil, fmt.Errorf("expect 2 scan dest; got: %d", l)
68
        }
69
        
70
        var params []executor.Param
71
        for k, v := range p.Params {
72
                params = append(params, executor.Param{
73
                        Name:  k,
74
                        Value: v,
75
                })
76
        }
77
        w := ""
78
        if p.Where != "" {
79
                w = fmt.Sprintf(" where %s", p.Where)
80
        }
81
        o := ""
82
        if p.Order != "" {
83
                o = fmt.Sprintf(" order by %s", p.Order)
84
        }
85
        q := ParallelQuery{
86
                SQL:    fmt.Sprintf("select %s from %s%s%s limit %d offset %d", p.Select, p.From, w, o, p.Limit, p.Limit*p.Page),
87
                Params: p.Params,
88
                Scan:   p.Scan[0],
89
        }
90
        
91
        c := ParallelQuery{
92
                SQL:    fmt.Sprintf("select count(%s) from %s%s", p.Count, p.From, w),
93
                Params: p.Params,
94
                Scan:   p.Scan[1],
95
        }
96
        
97
        return []ParallelQuery{q, c}, nil
98
}
func @176:74
Back

In /Users/kun/gobatis/gobatis/db.go:

176
func(s executor.Scanner) error {
177
                if d.executor.Query() {
178
                        e := s.Scan(dest)
179
                        if e != nil {
180
                                return e
181
                        }
182
                }
183
                d.rowsAffected = s.RowsAffected()
184
                d.lastInsertId = s.LastInsertId()
185
                return nil
186
        }
func Open
Back

In /Users/kun/gobatis/gobatis/db.go:

49
func Open(d dialector.Dialector, options ...Option) (db *DB, err error) {
50
        config := &Config{
51
                CreateBatchSize: 10,
52
                Plugins:         nil,
53
                NowFunc: func() time.Time {
54
                        return time.Now()
55
                },
56
                Dialector: d,
57
                Logger:    executor.DefaultLogger(),
58
                db:        nil,
59
        }
60
        config.db, err = d.DB()
61
        if err != nil {
62
                return
63
        }
64
        db = &DB{Config: config, Error: nil}
65
        return
66
}
func DB.FetchQuery
Back

In /Users/kun/gobatis/gobatis/db.go:

408
func (d *DB) FetchQuery(query FetchQuery) error {
409
        
410
        c := d.clone()
411
        
412
        raw := &executor.Raw{
413
                Ctx:    d.context(),
414
                Query:  true,
415
                SQL:    query.SQL,
416
                Params: nil,
417
        }
418
        
419
        if query.Scan == nil {
420
                d.addError(fmt.Errorf("FetchQeruy.Scan is nil"))
421
                return c.Error
422
        }
423
        
424
        for k, v := range query.Params {
425
                raw.Params = append(raw.Params, executor.Param{
426
                        Name:  k,
427
                        Value: v,
428
                })
429
        }
430
        if c.traceId == "" {
431
                c.traceId = fmt.Sprintf("TID%d", time.Now().UnixNano())
432
        }
433
        c.setExecutor(executor.NewFetchQuery(c.context(), c.conn(), raw, query.Batch))
434
        return c.executor.Execute(c.Logger, "", c.trace, c.debug, nil, func(s executor.Scanner) error {
435
                return query.Scan(s)
436
        })
437
}
func DB.Insert
Back

In /Users/kun/gobatis/gobatis/db.go:

271
func (d *DB) Insert(table string, data any, elems ...Element) *DB {
272
        c := d.clone()
273
        i := &insert{table: table, data: data, elems: elems}
274
        raw, err := c.raw(i)
275
        if err != nil {
276
                c.addError(err)
277
                return c
278
        }
279
        c.executor = executor.NewDefault(c.conn(), raw)
280
        if !raw.Query {
281
                c.execute(nil)
282
        }
283
        return c
284
}
func DB.Update
Back

In /Users/kun/gobatis/gobatis/db.go:

255
func (d *DB) Update(table string, data map[string]any, where Element, elems ...Element) *DB {
256
        c := d.clone()
257
        u := update{table: table, data: data, elems: append([]Element{where}, elems...)}
258
        raw, err := c.raw(u)
259
        if err != nil {
260
                c.addError(err)
261
                return c
262
        }
263
        c.executor = executor.NewDefault(c.conn(), raw)
264
        if !raw.Query {
265
                c.execute(nil)
266
        }
267
        return c
268
}
func DB.raw
Back

In /Users/kun/gobatis/gobatis/db.go:

201
func (d *DB) raw(element Element) (raw *executor.Raw, err error) {
202
        raw, err = element.Raw(d.Dialector.Namer(), "db")
203
        if err != nil {
204
                return
205
        }
206
        raw.Ctx = d.context()
207
        return
208
}
func DB.ParallelQuery
Back

In /Users/kun/gobatis/gobatis/db.go:

341
func (d *DB) ParallelQuery(queryer ...ParallelQuery) *DB {
342
        c := d.clone()
343
        if len(queryer) == 0 {
344
                c.addError(fmt.Errorf("no querer"))
345
                return c
346
        }
347
        if d.executor != nil {
348
                c.addError(fmt.Errorf("db executor confilct"))
349
                return c
350
        }
351
        
352
        var executors []executor.Executor
353
        for _, v := range queryer {
354
                item, err := v.executor(d.Dialector.Namer(), "db")
355
                if err != nil {
356
                        c.addError(err)
357
                        return c
358
                }
359
                item.Conn = c.conn()
360
                item.Raw.Ctx = c.context()
361
                executors = append(executors, item)
362
        }
363
        
364
        lock := sync.Mutex{}
365
        wg := sync.WaitGroup{}
366
        pos := executor.CallFuncPos(0)
367
        for _, v := range executors {
368
                wg.Add(1)
369
                go func(v executor.Executor) {
370
                        defer func() {
371
                                wg.Done()
372
                        }()
373
                        err := v.Execute(c.Logger, pos, d.trace, d.debug, nil, nil)
374
                        if err != nil {
375
                                lock.Lock()
376
                                c.addError(err)
377
                                lock.Unlock()
378
                        }
379
                }(v)
380
        }
381
        wg.Wait()
382
        
383
        return c
384
}
func del.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

350
func (d del) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
351
        for _, v := range d.elems {
352
                switch vv := v.(type) {
353
                case *where:
354
                        if d.where != nil {
355
                                err = fmt.Errorf("batis.Where() should be invoked no more than once")
356
                                return
357
                        }
358
                        d.where = vv
359
                default:
360
                        err = fmt.Errorf("method db.Delete() accept elements use of batis.Where()")
361
                        return
362
                }
363
        }
364
        
365
        raw = &executor.Raw{}
366
        
367
        var sqls []string
368
        sqls = append(sqls, fmt.Sprintf("delete from %s", namer.TableName(strings.TrimSpace(d.table))))
369
        
370
        if d.where != nil {
371
                var r *executor.Raw
372
                r, err = d.where.Raw(namer, tag)
373
                if err != nil {
374
                        return
375
                }
376
                sqls = append(sqls, fmt.Sprintf("%s", r.SQL))
377
                raw.Params = append(raw.Params, r.Params...)
378
        }
379
        raw.SQL = strings.Join(sqls, space)
380
        
381
        return
382
}
func DB.Delete
Back

In /Users/kun/gobatis/gobatis/db.go:

242
func (d *DB) Delete(table string, where Element) *DB {
243
        c := d.clone()
244
        raw, err := c.raw(del{table: table, elems: []Element{where}})
245
        if err != nil {
246
                c.addError(err)
247
                return c
248
        }
249
        c.executor = executor.NewDefault(c.conn(), raw)
250
        c.execute(nil)
251
        return c
252
}
func DB.Exec
Back

In /Users/kun/gobatis/gobatis/db.go:

229
func (d *DB) Exec(sql string, params ...executor.Param) *DB {
230
        c := d.clone()
231
        raw, err := c.raw(exec{sql: sql, params: params})
232
        if err != nil {
233
                c.addError(err)
234
                return c
235
        }
236
        c.executor = executor.NewDefault(c.conn(), raw)
237
        c.execute(nil)
238
        return c
239
}
func DB.Query
Back

In /Users/kun/gobatis/gobatis/db.go:

211
func (d *DB) Query(sql string, params ...executor.Param) *DB {
212
        c := d.clone()
213
        raw, err := c.raw(query{sql: sql, params: params})
214
        if err != nil {
215
                c.addError(err)
216
                return c
217
        }
218
        c.executor = executor.NewDefault(c.conn(), raw)
219
        return c
220
}
func DB.InsertBatch
Back

In /Users/kun/gobatis/gobatis/db.go:

294
func (d *DB) InsertBatch(table string, batch int, data any, elems ...Element) *DB {
295
        c := d.clone()
296
        
297
        if batch <= 0 {
298
                c.addError(fmt.Errorf("expect batch > 0, got %d", batch))
299
                return c
300
        }
301
        
302
        if data == nil {
303
                c.addError(fmt.Errorf("data is nil"))
304
                return c
305
        }
306
        
307
        chunks, err := executor.SplitStructSlice(data, batch)
308
        if err != nil {
309
                c.addError(err)
310
                return c
311
        }
312
        
313
        var raws []*executor.Raw
314
        var q bool
315
        for _, v := range chunks {
316
                i := &insertBatch{
317
                        table: table,
318
                        batch: batch,
319
                        data:  v,
320
                        elems: elems,
321
                }
322
                var raw *executor.Raw
323
                raw, err = c.raw(i)
324
                if err != nil {
325
                        c.addError(err)
326
                        return c
327
                }
328
                if raw.Query {
329
                        q = true
330
                }
331
                raws = append(raws, raw)
332
        }
333
        
334
        c.setExecutor(executor.NewInsertBatch(c.context(), c.conn(), raws))
335
        if !q {
336
                c.execute(nil)
337
        }
338
        return c
339
}
func update.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

97
func (u update) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
98
        for _, v := range u.elems {
99
                switch vv := v.(type) {
100
                case *where:
101
                        if u.where != nil {
102
                                err = fmt.Errorf("batis.Where() should be invoked no more than once")
103
                                return
104
                        }
105
                        u.where = vv
106
                case *returning:
107
                        if u.returning != nil {
108
                                err = fmt.Errorf("batis.Returning() should be invoked no more than once")
109
                                return
110
                        }
111
                        u.returning = vv
112
                default:
113
                        err = fmt.Errorf("method db.Update() accept elements use of batis.Where()")
114
                        return
115
                }
116
        }
117
        
118
        raw = &executor.Raw{
119
                Query: u.returning != nil,
120
        }
121
        
122
        var sqls []string
123
        sqls = append(sqls, fmt.Sprintf("update %s set", namer.TableName(u.table)))
124
        
125
        var sets []string
126
        for k := range u.data {
127
                sets = append(sets, fmt.Sprintf("%s=#{%s}", namer.ColumnName(k), k))
128
        }
129
        sqls = append(sqls, strings.Join(sets, ","))
130
        for k, v := range u.data {
131
                raw.Params = append(raw.Params, executor.Param{
132
                        Name:  k,
133
                        Value: v,
134
                })
135
        }
136
        if u.where != nil {
137
                var r *executor.Raw
138
                r, err = u.where.Raw(namer, tag)
139
                if err != nil {
140
                        return
141
                }
142
                sqls = append(sqls, fmt.Sprintf("%s", r.SQL))
143
                raw.Params = append(raw.Params, r.Params...)
144
        }
145
        raw.SQL = strings.Join(sqls, space)
146
        
147
        return
148
}
func insert.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

158
func (i insert) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
159
        
160
        defer func() {
161
                if err != nil {
162
                        err = fmt.Errorf("build insert sql error: %w", err)
163
                }
164
        }()
165
        
166
        for _, v := range i.elems {
167
                switch vv := v.(type) {
168
                case *onConflict:
169
                        if i.onConflict != nil {
170
                                err = fmt.Errorf("batis.OnConflict() should be invoked no more than once")
171
                                return
172
                        }
173
                        i.onConflict = vv
174
                case *returning:
175
                        if i.returning != nil {
176
                                err = fmt.Errorf("batis.Returning() should be invoked no more than once")
177
                                return
178
                        }
179
                        i.returning = vv
180
                default:
181
                        err = fmt.Errorf("method db.Insert() accept elements use of batis.OnConflict() or batis.Returning()")
182
                        return
183
                }
184
        }
185
        raw = &executor.Raw{
186
                Query: i.returning != nil,
187
        }
188
        var rows []executor.Row
189
        switch vv := i.data.(type) {
190
        case Rows:
191
                rows, err = vv.Reflect(namer, tag)
192
                if err != nil {
193
                        return
194
                }
195
        default:
196
                rows, err = executor.ReflectRows(i.data, namer, tag)
197
                if err != nil {
198
                        return
199
                }
200
        }
201
        
202
        if l := len(rows); l != 1 {
203
                err = fmt.Errorf("expect 1 row, got: %d", l)
204
                return
205
        }
206
        
207
        var sqls []string
208
        
209
        sqls = append(sqls, fmt.Sprintf("insert into %s(%s) values(%s)",
210
                namer.TableName(i.table),
211
                strings.Join(executor.RowColumns(rows[0], namer), ","),
212
                strings.Join(executor.RowVars(rows[0]), ","),
213
        ))
214
        raw.Params = append(raw.Params, executor.RowParams(rows[0])...)
215
        
216
        if i.onConflict != nil {
217
                var r *executor.Raw
218
                r, err = i.onConflict.Raw(namer, tag)
219
                if err != nil {
220
                        return
221
                }
222
                sqls = append(sqls, r.SQL)
223
                raw.Params = append(raw.Params, r.Params...)
224
        }
225
        
226
        if i.returning != nil {
227
                var r *executor.Raw
228
                r, err = i.returning.Raw(namer, tag)
229
                if err != nil {
230
                        return
231
                }
232
                sqls = append(sqls, r.SQL)
233
                raw.Params = append(raw.Params, r.Params...)
234
        }
235
        
236
        raw.SQL = strings.Join(sqls, space)
237
        
238
        return
239
}
func DB.PagingQuery
Back

In /Users/kun/gobatis/gobatis/db.go:

386
func (d *DB) PagingQuery(query PagingQuery) *DB {
387
        c := d.clone()
388
        queries, err := query.executors(d.Dialector.Namer(), "db")
389
        if err != nil {
390
                c.addError(err)
391
                return c
392
        }
393
        return c.ParallelQuery(queries...)
394
}
func DB.conn
Back

In /Users/kun/gobatis/gobatis/db.go:

189
func (d *DB) conn() executor.Conn {
190
        if d.tx != nil {
191
                return d.tx
192
        } else {
193
                conn, err := d.db.Conn(d.context())
194
                if err != nil {
195
                        d.addError(err)
196
                }
197
                return executor.NewDB(conn, d.traceId)
198
        }
199
}
func DB.context
Back

In /Users/kun/gobatis/gobatis/db.go:

156
func (d *DB) context() context.Context {
157
        if d.ctx == nil {
158
                return context.Background()
159
        }
160
        return d.ctx
161
}
func insertBatch.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

250
func (i insertBatch) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
251
        
252
        defer func() {
253
                if err != nil {
254
                        err = fmt.Errorf("build insert batch sql error: %w", err)
255
                }
256
        }()
257
        
258
        for _, v := range i.elems {
259
                switch vv := v.(type) {
260
                case *onConflict:
261
                        if i.onConflict != nil {
262
                                err = fmt.Errorf("batis.OnConflict() should be invoked no more than once")
263
                                return
264
                        }
265
                        i.onConflict = vv
266
                case *returning:
267
                        if i.returning != nil {
268
                                err = fmt.Errorf("batis.Returning() should be invoked no more than once")
269
                                return
270
                        }
271
                        i.returning = vv
272
                default:
273
                        err = fmt.Errorf("method db.Insert() accept elements use of batis.OnConflict() or batis.Returning()")
274
                        return
275
                }
276
        }
277
        
278
        raw = &executor.Raw{
279
                Query: i.returning != nil,
280
        }
281
        
282
        var rows []executor.Row
283
        switch vv := i.data.(type) {
284
        case Rows:
285
                rows, err = vv.Reflect(namer, tag)
286
                if err != nil {
287
                        return
288
                }
289
        default:
290
                rows, err = executor.ReflectRows(i.data, namer, tag)
291
                if err != nil {
292
                        return
293
                }
294
        }
295
        
296
        if l := len(rows); l == 0 {
297
                err = fmt.Errorf("expect rows legnth > 0, got: %d", l)
298
                return
299
        }
300
        
301
        var sqls []string
302
        
303
        sqls = append(sqls, fmt.Sprintf("insert into %s(%s) values%s",
304
                namer.TableName(i.table),
305
                strings.Join(executor.RowColumns(rows[0], namer), ","),
306
                strings.Join(executor.RowsVars(rows), ","),
307
        ))
308
        raw.Params = append(raw.Params, executor.RowsParams(rows)...)
309
        
310
        if i.onConflict != nil {
311
                var r *executor.Raw
312
                r, err = i.onConflict.Raw(namer, tag)
313
                if err != nil {
314
                        return
315
                }
316
                sqls = append(sqls, r.SQL)
317
                r.Params = append(r.Params, r.Params...)
318
        }
319
        
320
        if i.returning != nil {
321
                var r *executor.Raw
322
                r, err = i.returning.Raw(namer, tag)
323
                if err != nil {
324
                        return
325
                }
326
                sqls = append(sqls, r.SQL)
327
                r.Params = append(r.Params, r.Params...)
328
        }
329
        
330
        raw.SQL = strings.Join(sqls, space)
331
        
332
        return
333
}
func @369:6
Back

In /Users/kun/gobatis/gobatis/db.go:

369
func(v executor.Executor) {
370
                        defer func() {
371
                                wg.Done()
372
                        }()
373
                        err := v.Execute(c.Logger, pos, d.trace, d.debug, nil, nil)
374
                        if err != nil {
375
                                lock.Lock()
376
                                c.addError(err)
377
                                lock.Unlock()
378
                        }
379
                }
func DB.setExecutor
Back

In /Users/kun/gobatis/gobatis/db.go:

286
func (d *DB) setExecutor(e executor.Executor) {
287
        if d.executor != nil {
288
                d.addError(fmt.Errorf("executor duplicated"))
289
                return
290
        }
291
        d.executor = e
292
}
func @252:8
Back

In /Users/kun/gobatis/gobatis/element.go:

252
func() {
253
                if err != nil {
254
                        err = fmt.Errorf("build insert batch sql error: %w", err)
255
                }
256
        }
func @160:8
Back

In /Users/kun/gobatis/gobatis/element.go:

160
func() {
161
                if err != nil {
162
                        err = fmt.Errorf("build insert sql error: %w", err)
163
                }
164
        }
func DB.execute
Back

In /Users/kun/gobatis/gobatis/db.go:

163
func (d *DB) execute(dest any) {
164
        if d.Error != nil {
165
                return
166
        }
167
        if d.executor == nil {
168
                d.addError(fmt.Errorf("no executor"))
169
                return
170
        }
171
        if d.executed.Swap(true) {
172
                d.addError(fmt.Errorf("repeat execution"))
173
                return
174
        }
175
        
176
        d.addError(d.executor.Execute(d.Logger, "", d.trace, d.debug, d.affect, func(s executor.Scanner) error {
177
                if d.executor.Query() {
178
                        e := s.Scan(dest)
179
                        if e != nil {
180
                                return e
181
                        }
182
                }
183
                d.rowsAffected = s.RowsAffected()
184
                d.lastInsertId = s.LastInsertId()
185
                return nil
186
        }))
187
}
func DB.Begin
Back

In /Users/kun/gobatis/gobatis/db.go:

439
func (d *DB) Begin() *DB {
440
        c := d.clone()
441
        if c.tx != nil {
442
                c.addError(fmt.Errorf("there is already a transaction"))
443
                return c
444
        }
445
        
446
        defer func() {
447
                d.Logger.Trace("", c.traceId, true, d.Error, &executor.SQLTrace{
448
                        Trace:        d.trace,
449
                        Debug:        d.debug,
450
                        BeginAt:      time.Now(),
451
                        RawSQL:       "begin",
452
                        PlainSQL:     "begin",
453
                        RowsAffected: 0,
454
                })
455
        }()
456
        
457
        tx, err := c.db.Begin()
458
        if err != nil {
459
                c.addError(err)
460
                return c
461
        }
462
        
463
        if c.traceId == "" {
464
                c.traceId = fmt.Sprintf("%p", d)
465
        }
466
        
467
        c.tx = executor.NewTx(tx, c.traceId)
468
        
469
        return c
470
}
func UseDB
Back

In /Users/kun/gobatis/gobatis/db.go:

37
func UseDB(ctx context.Context) *DB {
38
        v := ctx.Value(dbKey)
39
        if v != nil {
40
                if vv, ok := v.(*DB); ok {
41
                        c := vv.clone()
42
                        c.ctx = ctx
43
                        return c
44
                }
45
        }
46
        return nil
47
}
func DB.Rollback
Back

In /Users/kun/gobatis/gobatis/db.go:

494
func (d *DB) Rollback() *DB {
495
        if d.tx == nil {
496
                d.addError(executor.ErrInvalidTransaction)
497
                return d
498
        }
499
        defer func() {
500
                d.addError(d.tx.Close())
501
                d.Logger.Trace("", d.traceId, true, d.Error, &executor.SQLTrace{
502
                        Trace:        d.trace,
503
                        Debug:        d.debug,
504
                        BeginAt:      time.Now(),
505
                        RawSQL:       "rollback",
506
                        PlainSQL:     "rollback",
507
                        RowsAffected: 0,
508
                })
509
        }()
510
        d.addError(d.tx.Rollback())
511
        return d
512
}
func DB.Commit
Back

In /Users/kun/gobatis/gobatis/db.go:

472
func (d *DB) Commit() *DB {
473
        if d.tx == nil {
474
                d.addError(executor.ErrInvalidTransaction)
475
                return d
476
        }
477
        
478
        defer func() {
479
                d.addError(d.tx.Close())
480
                d.Logger.Trace("", d.traceId, true, d.Error, &executor.SQLTrace{
481
                        Trace:        d.trace,
482
                        Debug:        d.debug,
483
                        BeginAt:      time.Now(),
484
                        RawSQL:       "commit",
485
                        PlainSQL:     "commit",
486
                        RowsAffected: 0,
487
                })
488
        }()
489
        
490
        d.addError(d.tx.Commit())
491
        return d
492
}
func DB.WithContext
Back

In /Users/kun/gobatis/gobatis/db.go:

102
func (d *DB) WithContext(ctx context.Context) *DB {
103
        v := UseDB(ctx)
104
        if v != nil {
105
                return v
106
        }
107
        c := d.clone()
108
        c.ctx = ctx
109
        return c
110
}
func DB.WithTraceId
Back

In /Users/kun/gobatis/gobatis/db.go:

112
func (d *DB) WithTraceId(traceId string) *DB {
113
        c := d.clone()
114
        if c.traceId != "" {
115
                d.addError(fmt.Errorf("set traceId  repeatedly"))
116
                return c
117
        }
118
        c.traceId = traceId
119
        return c
120
}
func selectColumns.Reflect
Back

In /Users/kun/gobatis/gobatis/rows.go:

34
func (s selectColumns) Reflect(namer dialector.Namer, tag string) (rows []executor.Row, err error) {
35
        rows, err = executor.ReflectRows(s.data, namer, tag)
36
        if err != nil {
37
                return
38
        }
39
40
        return
41
}
func DB.Trace
Back

In /Users/kun/gobatis/gobatis/db.go:

128
func (d *DB) Trace() *DB {
129
        c := d.clone()
130
        c.trace = true
131
        return c
132
}
func innerSQL.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

39
func (i innerSQL) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
40
        raw = &executor.Raw{
41
                SQL:    i.sql,
42
                Params: i.params,
43
        }
44
        return
45
}
func @499:8
Back

In /Users/kun/gobatis/gobatis/db.go:

499
func() {
500
                d.addError(d.tx.Close())
501
                d.Logger.Trace("", d.traceId, true, d.Error, &executor.SQLTrace{
502
                        Trace:        d.trace,
503
                        Debug:        d.debug,
504
                        BeginAt:      time.Now(),
505
                        RawSQL:       "rollback",
506
                        PlainSQL:     "rollback",
507
                        RowsAffected: 0,
508
                })
509
        }
func @478:8
Back

In /Users/kun/gobatis/gobatis/db.go:

478
func() {
479
                d.addError(d.tx.Close())
480
                d.Logger.Trace("", d.traceId, true, d.Error, &executor.SQLTrace{
481
                        Trace:        d.trace,
482
                        Debug:        d.debug,
483
                        BeginAt:      time.Now(),
484
                        RawSQL:       "commit",
485
                        PlainSQL:     "commit",
486
                        RowsAffected: 0,
487
                })
488
        }
func DB.DB
Back

In /Users/kun/gobatis/gobatis/db.go:

144
func (d *DB) DB() *sql.DB {
145
        return d.db
146
}
func WithDebug
Back

In /Users/kun/gobatis/gobatis/db.go:

33
func WithDebug(parent context.Context, debug bool) context.Context {
34
        return context.WithValue(parent, "debug", debug)
35
}
func fetch.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

338
func (f fetch) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
339
        //TODO implement me
340
        panic("implement me")
341
}
func Config.Apply
Back

In /Users/kun/gobatis/gobatis/config.go:

28
func (c Config) Apply(config *Config) error {
29
        //TODO implement me
30
        panic("implement me")
31
}
func @446:8
Back

In /Users/kun/gobatis/gobatis/db.go:

446
func() {
447
                d.Logger.Trace("", c.traceId, true, d.Error, &executor.SQLTrace{
448
                        Trace:        d.trace,
449
                        Debug:        d.debug,
450
                        BeginAt:      time.Now(),
451
                        RawSQL:       "begin",
452
                        PlainSQL:     "begin",
453
                        RowsAffected: 0,
454
                })
455
        }
func newInnerSQL
Back

In /Users/kun/gobatis/gobatis/element.go:

30
func newInnerSQL(sql string, params ...executor.Param) innerSQL {
31
        return innerSQL{sql: sql, params: params}
32
}
func build.Raw
Back

In /Users/kun/gobatis/gobatis/element.go:

414
func (b build) Raw(namer dialector.Namer, tag string) (raw *executor.Raw, err error) {
415
        panic("todo")
416
}
func @53:12
Back

In /Users/kun/gobatis/gobatis/db.go:

53
func() time.Time {
54
                        return time.Now()
55
                }
func DB.LastInsertId
Back

In /Users/kun/gobatis/gobatis/db.go:

396
func (d *DB) LastInsertId() (int64, error) {
397
        return d.lastInsertId, d.Error
398
}
func DB.AssociateQuery
Back

In /Users/kun/gobatis/gobatis/db.go:

404
func (d *DB) AssociateQuery(query AssociateQuery) error {
405
        return nil
406
}
func LooseDest
Back

In /Users/kun/gobatis/gobatis/param.go:

15
func LooseDest(dest any, fields ...string) Dest {
16
        return Dest{loose: true, dest: dest, fields: fields}
17
}
func WithTraceId
Back

In /Users/kun/gobatis/gobatis/db.go:

29
func WithTraceId(parent context.Context, traceId string) context.Context {
30
        return context.WithValue(parent, traceIdKey, traceId)
31
}
func WithTx
Back

In /Users/kun/gobatis/gobatis/db.go:

25
func WithTx(parent context.Context, tx *sql.Tx) context.Context {
26
        return context.WithValue(parent, dbKey, tx)
27
}
func Config.AfterInitialize
Back

In /Users/kun/gobatis/gobatis/config.go:

33
func (c Config) AfterInitialize(db *DB) error {
34
        //TODO implement me
35
        panic("implement me")
36
}
Back

In /Users/kun/gobatis/gobatis/queryer.go:

113
func AssociateLink(dest any, condition, inject string) any {
114
        return nil
115
}
func Select
Back

In /Users/kun/gobatis/gobatis/rows.go:

8
func Select(data any, columns string) Rows {
9
        return &selectColumns{
10
                columns: columns,
11
                data:    data,
12
        }
13
}
func Except
Back

In /Users/kun/gobatis/gobatis/rows.go:

15
func Except(data any, columns string) Rows {
16
        return &exceptColumns{
17
                data:    data,
18
                columns: columns,
19
        }
20
}
func DB.Stats
Back

In /Users/kun/gobatis/gobatis/db.go:

152
func (d *DB) Stats() sql.DBStats {
153
        return d.db.Stats()
154
}
func exceptColumns.Reflect
Back

In /Users/kun/gobatis/gobatis/rows.go:

48
func (e exceptColumns) Reflect(namer dialector.Namer, tag string) (rows []executor.Row, err error) {
49
        //TODO implement me
50
        panic("implement me")
51
}
Package Overview: github.com/gobatis/gobatis/cast 47.0%

Please select a function to see what's left for testing.

ToStringE(...) github.com/gobatis/gobatis/cast/caste.go 100.0% 26/26
ToTimeE(...) github.com/gobatis/gobatis/cast/caste.go 100.0% 11/11
Indirect(...) github.com/gobatis/gobatis/cast/caste.go 100.0% 8/8
indirectToStringerOrError(...) github.com/gobatis/gobatis/cast/caste.go 100.0% 8/8
AddUint64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 8/8
MulUint64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 8/8
BigAddUint64(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 6/6
BigMulUint64(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 6/6
MulInt64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 6/6
SubInt64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 6/6
AddInt64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 6/6
parseDateWith(...) github.com/gobatis/gobatis/cast/caste.go 100.0% 4/4
DivInt64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 4/4
DivUint64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 4/4
BigAddInt64(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 2/2
BigMulInt64(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 2/2
BigSubInt64(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 2/2
castOverFlowError(...) github.com/gobatis/gobatis/cast/caste.go 100.0% 1/1
resultOverFlowError(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 1/1
StringToDate(...) github.com/gobatis/gobatis/cast/caste.go 100.0% 1/1
SubUint64E(...) github.com/gobatis/gobatis/cast/calc.go 100.0% 1/1
ToUint64E(...) github.com/gobatis/gobatis/cast/caste.go 95.3% 41/43
ToInt64E(...) github.com/gobatis/gobatis/cast/caste.go 90.9% 30/33
ToUintE(...) github.com/gobatis/gobatis/cast/caste.go 90.7% 49/54
ToUint32E(...) github.com/gobatis/gobatis/cast/caste.go 90.0% 54/60
ToUint16E(...) github.com/gobatis/gobatis/cast/caste.go 87.1% 61/70
ToInt32E(...) github.com/gobatis/gobatis/cast/caste.go 86.4% 38/44
ToUint8E(...) github.com/gobatis/gobatis/cast/caste.go 85.5% 65/76
IsNil(...) github.com/gobatis/gobatis/cast/caste.go 83.3% 5/6
ToInt16E(...) github.com/gobatis/gobatis/cast/caste.go 82.8% 48/58
ToIntE(...) github.com/gobatis/gobatis/cast/caste.go 82.7% 43/52
ToInt8E(...) github.com/gobatis/gobatis/cast/caste.go 81.2% 52/64
ToDecimalE(...) github.com/gobatis/gobatis/cast/caste.go 66.7% 6/9
DivInt32E(...) github.com/gobatis/gobatis/cast/calc.go 62.5% 5/8
SubInt8E(...) github.com/gobatis/gobatis/cast/calc.go 62.5% 5/8
MulIntE(...) github.com/gobatis/gobatis/cast/calc.go 62.5% 5/8
DivIntE(...) github.com/gobatis/gobatis/cast/calc.go 62.5% 5/8
MulInt16E(...) github.com/gobatis/gobatis/cast/calc.go 62.5% 5/8
AddIntE(...) github.com/gobatis/gobatis/cast/calc.go 62.5% 5/8
ToBinOperandE(...) github.com/gobatis/gobatis/cast/caste.go 57.7% 15/26
DivAnyE(...) github.com/gobatis/gobatis/cast/calc.go 37.5% 6/16
MulAnyE(...) github.com/gobatis/gobatis/cast/calc.go 31.2% 5/16
AddAnyE(...) github.com/gobatis/gobatis/cast/calc.go 29.4% 5/17
SubAnyE(...) github.com/gobatis/gobatis/cast/calc.go 25.0% 4/16
ToBoolE(...) github.com/gobatis/gobatis/cast/caste.go 0.0% 0/37
ToFloat32E(...) github.com/gobatis/gobatis/cast/caste.go 0.0% 0/23
ToFloat64E(...) github.com/gobatis/gobatis/cast/caste.go 0.0% 0/22
ToReflectTypeE(...) github.com/gobatis/gobatis/cast/caste.go 0.0% 0/20
NotEqualAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/19
EqualAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/19
UnaryMinusAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/19
UnaryPlusAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/18
GreaterAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/17
LessOrEqualAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/17
LessAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/17
GreaterOrEqualAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/17
BitClearAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/15
LeftShiftAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/15
RightShiftAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/15
ModAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/15
CaretAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/15
OrAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/15
AndAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/15
UnaryCaretAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/13
DivUint16E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
AddInt32E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
MulUint32E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
SubUint32E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
AddUint32E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
MulUint16E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
SubUint16E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
AddUint16E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
DivUint8E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
MulUint8E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
SubUint8E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
AddUint8E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
DivUintE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
SubIntE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
AddInt8E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
MulInt8E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
MulUintE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
SubUintE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
AddUintE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
MulInt32E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
SubInt32E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
DivUint32E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
DivInt16E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
SubInt16E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
AddInt16E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
DivInt8E(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/8
LogicAndAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/7
LogicOrAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/7
BigDivUint64(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/6
BigSubUint64(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/6
UnaryNotAnyE(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/4
Value.Add(...) github.com/gobatis/gobatis/cast/value.go 0.0% 0/2
jsonStringToObject(...) github.com/gobatis/gobatis/cast/caste.go 0.0% 0/2
BigDivInt64(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/2
MulFloat32(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
SubFloat64(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
AddFloat64(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
MulFloat64(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
DivFloat64(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
AddFloat32(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
SubFloat32(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
DivFloat32(...) github.com/gobatis/gobatis/cast/calc.go 0.0% 0/1
func ToStringE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1085
func ToStringE(i interface{}) (string, error) {
1086
        i = indirectToStringerOrError(i)
1087
        
1088
        switch s := i.(type) {
1089
        case string:
1090
                return s, nil
1091
        case bool:
1092
                return strconv.FormatBool(s), nil
1093
        case float64:
1094
                return strconv.FormatFloat(s, 'f', -1, 64), nil
1095
        case float32:
1096
                return strconv.FormatFloat(float64(s), 'f', -1, 32), nil
1097
        case int:
1098
                return strconv.Itoa(s), nil
1099
        case int64:
1100
                return strconv.FormatInt(s, 10), nil
1101
        case int32:
1102
                return strconv.Itoa(int(s)), nil
1103
        case int16:
1104
                return strconv.FormatInt(int64(s), 10), nil
1105
        case int8:
1106
                return strconv.FormatInt(int64(s), 10), nil
1107
        case uint:
1108
                return strconv.FormatUint(uint64(s), 10), nil
1109
        case uint64:
1110
                return strconv.FormatUint(uint64(s), 10), nil
1111
        case uint32:
1112
                return strconv.FormatUint(uint64(s), 10), nil
1113
        case uint16:
1114
                return strconv.FormatUint(uint64(s), 10), nil
1115
        case uint8:
1116
                return strconv.FormatUint(uint64(s), 10), nil
1117
        case []byte:
1118
                return string(s), nil
1119
        case template.HTML:
1120
                return string(s), nil
1121
        case template.URL:
1122
                return string(s), nil
1123
        case template.JS:
1124
                return string(s), nil
1125
        case template.CSS:
1126
                return string(s), nil
1127
        case template.HTMLAttr:
1128
                return string(s), nil
1129
        case nil:
1130
                return "", nil
1131
        case fmt.Stringer:
1132
                return s.String(), nil
1133
        case error:
1134
                return s.Error(), nil
1135
        default:
1136
                return "", fmt.Errorf("unable to cast %#v of type %T to string", i, i)
1137
        }
1138
}
func ToTimeE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

29
func ToTimeE(i interface{}) (time.Time, error) {
30
        i = Indirect(i)
31
        
32
        switch v := i.(type) {
33
        case time.Time:
34
                return v, nil
35
        case string:
36
                return StringToDate(v)
37
        case int:
38
                return time.Unix(int64(v), 0), nil
39
        case int64:
40
                return time.Unix(v, 0), nil
41
        case int32:
42
                return time.Unix(int64(v), 0), nil
43
        case uint:
44
                return time.Unix(int64(v), 0), nil
45
        case uint64:
46
                return time.Unix(int64(v), 0), nil
47
        case uint32:
48
                return time.Unix(int64(v), 0), nil
49
        default:
50
                return time.Time{}, fmt.Errorf("unable to cast %#v of type %T to Time", i, i)
51
        }
52
}
func Indirect
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1049
func Indirect(a interface{}) interface{} {
1050
        if a == nil {
1051
                return nil
1052
        }
1053
        if t := reflect.TypeOf(a); t.Kind() != reflect.Ptr {
1054
                // Avoid creating a reflect.Value if it's not a pointer.
1055
                return a
1056
        }
1057
        v := reflect.ValueOf(a)
1058
        for v.Kind() == reflect.Ptr && !v.IsNil() {
1059
                v = v.Elem()
1060
        }
1061
        return v.Interface()
1062
}
func indirectToStringerOrError
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1069
func indirectToStringerOrError(a interface{}) interface{} {
1070
        if a == nil {
1071
                return nil
1072
        }
1073
        
1074
        var errorType = reflect.TypeOf((*error)(nil)).Elem()
1075
        var fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem()
1076
        
1077
        v := reflect.ValueOf(a)
1078
        for !v.Type().Implements(fmtStringerType) && !v.Type().Implements(errorType) && v.Kind() == reflect.Ptr && !v.IsNil() {
1079
                v = v.Elem()
1080
        }
1081
        return v.Interface()
1082
}
func AddUint64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

147
func AddUint64E(a, b uint64) (r uint64, err error) {
148
        r = a + b
149
        br := BigAddUint64(a, b)
150
        rr := &big.Int{}
151
        rr.SetUint64(r)
152
        if rr.Cmp(br) != 0 {
153
                err = resultOverFlowError("uint64")
154
                return
155
        }
156
        return
157
}
func MulUint64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

171
func MulUint64E(a, b uint64) (r uint64, err error) {
172
        r = a * b
173
        br := BigMulUint64(a, b)
174
        rr := &big.Int{}
175
        rr.SetUint64(r)
176
        if rr.Cmp(br) != 0 {
177
                err = resultOverFlowError("uint64")
178
                return
179
        }
180
        return
181
}
func BigAddUint64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

36
func BigAddUint64(a, b uint64) *big.Int {
37
        r := big.NewInt(0)
38
        ba := &big.Int{}
39
        ba.SetUint64(a)
40
        bb := &big.Int{}
41
        bb.SetUint64(b)
42
        return r.Add(ba, bb)
43
}
func BigMulUint64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

54
func BigMulUint64(a, b uint64) *big.Int {
55
        r := big.NewInt(0)
56
        ba := &big.Int{}
57
        ba.SetUint64(a)
58
        bb := &big.Int{}
59
        bb.SetUint64(b)
60
        return r.Mul(ba, bb)
61
}
func MulInt64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

124
func MulInt64E(a, b int64) (r int64, err error) {
125
        r = a * b
126
        br := BigMulInt64(a, b)
127
        if big.NewInt(r).Cmp(br) != 0 {
128
                err = resultOverFlowError("int64")
129
                return
130
        }
131
        return
132
}
func SubInt64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

114
func SubInt64E(a, b int64) (r int64, err error) {
115
        r = a - b
116
        br := BigSubInt64(a, b)
117
        if big.NewInt(r).Cmp(br) != 0 {
118
                err = resultOverFlowError("int64")
119
                return
120
        }
121
        return
122
}
func AddInt64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

104
func AddInt64E(a, b int64) (r int64, err error) {
105
        r = a + b
106
        br := BigAddInt64(a, b)
107
        if big.NewInt(r).Cmp(br) != 0 {
108
                err = resultOverFlowError("int64")
109
                return
110
        }
111
        return
112
}
func parseDateWith
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1372
func parseDateWith(s string, dates []string) (d time.Time, e error) {
1373
        for _, dateType := range dates {
1374
                if d, e = time.Parse(dateType, s); e == nil {
1375
                        return
1376
                }
1377
        }
1378
        return d, fmt.Errorf("unable to parse date: %s", s)
1379
}
func DivInt64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

134
func DivInt64E(a, b int64) (r int64, err error) {
135
        if b == 0 {
136
                err = fmt.Errorf("divide 0")
137
                return
138
        }
139
        //br := BigDivInt64(a, b)
140
        //if big.NewInt(r).Cmp(br) != 0 {
141
        //        err = resultOverFlowError("int64")
142
        //        return
143
        //}
144
        return a / b, nil
145
}
func DivUint64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

183
func DivUint64E(a, b uint64) (r uint64, err error) {
184
        if b == 0 {
185
                err = fmt.Errorf("divide 0")
186
                return
187
        }
188
        //r = a / b
189
        //br := BigDivUint64(a, b)
190
        //rr := &big.Int{}
191
        //rr.SetUint64(r)
192
        //if rr.Cmp(br) != 0 {
193
        //        err = resultOverFlowError("uint64")
194
        //        return
195
        //}
196
        return a / b, nil
197
}
func BigAddInt64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

16
func BigAddInt64(a, b int64) *big.Int {
17
        r := big.NewInt(0)
18
        return r.Add(big.NewInt(a), big.NewInt(b))
19
}
func BigMulInt64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

26
func BigMulInt64(a, b int64) *big.Int {
27
        r := big.NewInt(0)
28
        return r.Mul(big.NewInt(a), big.NewInt(b))
29
}
func BigSubInt64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

21
func BigSubInt64(a, b int64) *big.Int {
22
        r := big.NewInt(0)
23
        return r.Sub(big.NewInt(a), big.NewInt(b))
24
}
func castOverFlowError
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

24
func castOverFlowError(from, to string) error {
25
        return fmt.Errorf("result overflow type from %s to %s", from, to)
26
}
func resultOverFlowError
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

12
func resultOverFlowError(t string) error {
13
        return fmt.Errorf("result overflow type %s", t)
14
}
func StringToDate
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1341
func StringToDate(s string) (time.Time, error) {
1342
        return parseDateWith(s, []string{
1343
                time.RFC3339,
1344
                "2006-01-02T15:04:05", // iso8601 without timezone
1345
                time.RFC1123Z,
1346
                time.RFC1123,
1347
                time.RFC822Z,
1348
                time.RFC822,
1349
                time.RFC850,
1350
                time.ANSIC,
1351
                time.UnixDate,
1352
                time.RubyDate,
1353
                "2006-01-02 15:04:05.999999999 -0700 MST", // Time.String()
1354
                "2006-01-02",
1355
                "02 Jan 2006",
1356
                "2006-01-02T15:04:05-0700", // RFC3339 without timezone hh:mm colon
1357
                "2006-01-02 15:04:05 -07:00",
1358
                "2006-01-02 15:04:05 -0700",
1359
                "2006-01-02 15:04:05Z07:00", // RFC3339 without T
1360
                "2006-01-02 15:04:05Z0700",  // RFC3339 without T or timezone hh:mm colon
1361
                "2006-01-02 15:04:05",
1362
                time.Kitchen,
1363
                time.Stamp,
1364
                time.StampMilli,
1365
                time.StampMicro,
1366
                time.StampNano,
1367
                "15:04:05",    // time without T
1368
                "15:04:05+00", // TODO test time with T
1369
        })
1370
}
func SubUint64E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

159
func SubUint64E(a, b uint64) (r uint64, err error) {
160
        //r = a - b
161
        //br := BigSubUint64(a, b)
162
        //rr := &big.Int{}
163
        //rr.SetUint64(r)
164
        //if rr.Cmp(br) != 0 {
165
        //        err = resultOverFlowError("uint64")
166
        //        return
167
        //}
168
        return a - b, nil
169
}
func ToUint64E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

627
func ToUint64E(i interface{}) (uint64, error) {
628
        i = Indirect(i)
629
        
630
        switch s := i.(type) {
631
        case string:
632
                v, err := strconv.ParseUint(s, 0, 64)
633
                if err != nil {
634
                        return 0, fmt.Errorf("unable to cast %#v to uint64: %s", i, err)
635
                }
636
                d, err := decimal.NewFromString(s)
637
                if err != nil {
638
                        return 0, err
639
                }
640
                q, _ := decimal.NewFromString(s)
641
                if !d.Equal(q) {
642
                        return 0, castOverFlowError("string", "uint64")
643
                }
644
                return v, nil
645
        case int:
646
                if s < 0 {
647
                        return 0, errNegativeNotAllowed
648
                }
649
                return uint64(s), nil
650
        case int64:
651
                if s < 0 {
652
                        return 0, errNegativeNotAllowed
653
                }
654
                return uint64(s), nil
655
        case int32:
656
                if s < 0 {
657
                        return 0, errNegativeNotAllowed
658
                }
659
                return uint64(s), nil
660
        case int16:
661
                if s < 0 {
662
                        return 0, errNegativeNotAllowed
663
                }
664
                return uint64(s), nil
665
        case int8:
666
                if s < 0 {
667
                        return 0, errNegativeNotAllowed
668
                }
669
                return uint64(s), nil
670
        case uint:
671
                return uint64(s), nil
672
        case uint64:
673
                return s, nil
674
        case uint32:
675
                return uint64(s), nil
676
        case uint16:
677
                return uint64(s), nil
678
        case uint8:
679
                return uint64(s), nil
680
        case float32:
681
                if s < 0 {
682
                        return 0, errNegativeNotAllowed
683
                }
684
                return uint64(s), nil
685
        case float64:
686
                if s < 0 {
687
                        return 0, errNegativeNotAllowed
688
                }
689
                return uint64(s), nil
690
        case bool:
691
                if s {
692
                        return 1, nil
693
                }
694
                return 0, nil
695
        case nil:
696
                return 0, nil
697
        default:
698
                return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i)
699
        }
700
}
func ToInt64E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

123
func ToInt64E(i interface{}) (int64, error) {
124
        i = Indirect(i)
125
        
126
        switch s := i.(type) {
127
        case int:
128
                return int64(s), nil
129
        case int64:
130
                return s, nil
131
        case int32:
132
                return int64(s), nil
133
        case int16:
134
                return int64(s), nil
135
        case int8:
136
                return int64(s), nil
137
        case uint:
138
                return int64(s), nil
139
        case uint64:
140
                a := big.Int{}
141
                a.SetUint64(s)
142
                b := big.NewInt(math.MaxInt64)
143
                if a.Cmp(b) > 1 {
144
                        return 0, castOverFlowError("uint64", "int64")
145
                }
146
                return int64(s), nil
147
        case uint32:
148
                return int64(s), nil
149
        case uint16:
150
                return int64(s), nil
151
        case uint8:
152
                return int64(s), nil
153
        case float64:
154
                return int64(s), nil
155
        case float32:
156
                return int64(s), nil
157
        case string:
158
                v, err := strconv.ParseInt(s, 0, 0)
159
                if err != nil {
160
                        return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i)
161
                        
162
                }
163
                a, err := decimal.NewFromString(s)
164
                if err != nil {
165
                        return 0, err
166
                }
167
                if !a.Equal(decimal.NewFromInt(v)) {
168
                        return 0, castOverFlowError("string", "int64")
169
                }
170
                return v, nil
171
        case bool:
172
                if s {
173
                        return 1, nil
174
                }
175
                return 0, nil
176
        case nil:
177
                return 0, nil
178
        default:
179
                return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i)
180
        }
181
}
func ToUintE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

537
func ToUintE(i interface{}) (uint, error) {
538
        i = Indirect(i)
539
        
540
        switch s := i.(type) {
541
        case string:
542
                v, err := strconv.ParseUint(s, 0, 0)
543
                if err != nil {
544
                        return 0, fmt.Errorf("unable to cast %#v to uint: %s", i, err)
545
                }
546
                d, err := decimal.NewFromString(s)
547
                if err != nil {
548
                        return 0, err
549
                }
550
                r := uint(v)
551
                q, _ := decimal.NewFromString(fmt.Sprintf("%d", r))
552
                if !d.Equal(q) {
553
                        return 0, castOverFlowError("string", "uint")
554
                }
555
                return r, nil
556
        case int:
557
                if s < 0 {
558
                        return 0, errNegativeNotAllowed
559
                }
560
                return uint(s), nil
561
        case int64:
562
                if s < 0 {
563
                        return 0, errNegativeNotAllowed
564
                }
565
                r := uint(s)
566
                if int64(r) != s {
567
                        return 0, castOverFlowError("int64", "uint")
568
                }
569
                return r, nil
570
        case int32:
571
                if s < 0 {
572
                        return 0, errNegativeNotAllowed
573
                }
574
                return uint(s), nil
575
        case int16:
576
                if s < 0 {
577
                        return 0, errNegativeNotAllowed
578
                }
579
                return uint(s), nil
580
        case int8:
581
                if s < 0 {
582
                        return 0, errNegativeNotAllowed
583
                }
584
                return uint(s), nil
585
        case uint:
586
                return s, nil
587
        case uint64:
588
                r := uint(s)
589
                if uint64(r) != s {
590
                        return 0, castOverFlowError("uint64", "uint")
591
                }
592
                return r, nil
593
        case uint32:
594
                return uint(s), nil
595
        case uint16:
596
                return uint(s), nil
597
        case uint8:
598
                return uint(s), nil
599
        case float64:
600
                if s < 0 {
601
                        return 0, errNegativeNotAllowed
602
                }
603
                u := int64(s)
604
                r := uint(s)
605
                if int64(r) != u {
606
                        return 0, castOverFlowError("float64", "uint")
607
                }
608
                return r, nil
609
        case float32:
610
                if s < 0 {
611
                        return 0, errNegativeNotAllowed
612
                }
613
                return uint(s), nil
614
        case bool:
615
                if s {
616
                        return 1, nil
617
                }
618
                return 0, nil
619
        case nil:
620
                return 0, nil
621
        default:
622
                return 0, fmt.Errorf("unable to cast %#v of type %T to uint", i, i)
623
        }
624
}
func ToUint32E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

703
func ToUint32E(i interface{}) (uint32, error) {
704
        i = Indirect(i)
705
        
706
        switch s := i.(type) {
707
        case string:
708
                v, err := strconv.ParseUint(s, 0, 32)
709
                if err != nil {
710
                        return 0, fmt.Errorf("unable to cast %#v to uint32: %s", i, err)
711
                }
712
                d, err := decimal.NewFromString(s)
713
                if err != nil {
714
                        return 0, err
715
                }
716
                r := uint32(v)
717
                q, _ := decimal.NewFromString(fmt.Sprintf("%d", r))
718
                if !d.Equal(q) {
719
                        return 0, castOverFlowError("string", "uint32")
720
                }
721
                return r, nil
722
        case int:
723
                if s < 0 {
724
                        return 0, errNegativeNotAllowed
725
                }
726
                r := uint32(s)
727
                if int(r) != s {
728
                        return 0, castOverFlowError("int", "uint32")
729
                }
730
                return r, nil
731
        case int64:
732
                if s < 0 {
733
                        return 0, errNegativeNotAllowed
734
                }
735
                r := uint32(s)
736
                if int64(r) != s {
737
                        return 0, castOverFlowError("int64", "uint32")
738
                }
739
                return r, nil
740
        case int32:
741
                if s < 0 {
742
                        return 0, errNegativeNotAllowed
743
                }
744
                return uint32(s), nil
745
        case int16:
746
                if s < 0 {
747
                        return 0, errNegativeNotAllowed
748
                }
749
                return uint32(s), nil
750
        case int8:
751
                if s < 0 {
752
                        return 0, errNegativeNotAllowed
753
                }
754
                return uint32(s), nil
755
        case uint:
756
                r := uint32(s)
757
                if uint(r) != s {
758
                        return 0, castOverFlowError("uint", "uint32")
759
                }
760
                return r, nil
761
        case uint64:
762
                r := uint32(s)
763
                if uint64(r) != s {
764
                        return 0, castOverFlowError("uint", "uint32")
765
                }
766
                return r, nil
767
        case uint32:
768
                return s, nil
769
        case uint16:
770
                return uint32(s), nil
771
        case uint8:
772
                return uint32(s), nil
773
        case float64:
774
                if s < 0 {
775
                        return 0, errNegativeNotAllowed
776
                }
777
                u := int64(s)
778
                r := uint32(s)
779
                if int64(r) != u {
780
                        return 0, castOverFlowError("float64", "uint32")
781
                }
782
                return r, nil
783
        case float32:
784
                if s < 0 {
785
                        return 0, errNegativeNotAllowed
786
                }
787
                return uint32(s), nil
788
        case bool:
789
                if s {
790
                        return 1, nil
791
                }
792
                return 0, nil
793
        case nil:
794
                return 0, nil
795
        default:
796
                return 0, fmt.Errorf("unable to cast %#v of type %T to uint32", i, i)
797
        }
798
}
func ToUint16E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

801
func ToUint16E(i interface{}) (uint16, error) {
802
        i = Indirect(i)
803
        
804
        switch s := i.(type) {
805
        case string:
806
                v, err := strconv.ParseUint(s, 0, 16)
807
                if err != nil {
808
                        return 0, fmt.Errorf("unable to cast %#v to uint16: %s", i, err)
809
                }
810
                d, err := decimal.NewFromString(s)
811
                if err != nil {
812
                        return 0, err
813
                }
814
                r := uint16(v)
815
                q, _ := decimal.NewFromString(fmt.Sprintf("%d", r))
816
                if !d.Equal(q) {
817
                        return 0, castOverFlowError("string", "uint16")
818
                }
819
                return r, nil
820
        case int:
821
                if s < 0 {
822
                        return 0, errNegativeNotAllowed
823
                }
824
                r := uint16(s)
825
                if int(r) != s {
826
                        return 0, castOverFlowError("int", "uint16")
827
                }
828
                return r, nil
829
        case int64:
830
                if s < 0 {
831
                        return 0, errNegativeNotAllowed
832
                }
833
                r := uint16(s)
834
                if int64(r) != s {
835
                        return 0, castOverFlowError("int64", "uint16")
836
                }
837
                return r, nil
838
        case int32:
839
                if s < 0 {
840
                        return 0, errNegativeNotAllowed
841
                }
842
                r := uint16(s)
843
                if int32(r) != s {
844
                        return 0, castOverFlowError("int32", "uint16")
845
                }
846
                return r, nil
847
        case int16:
848
                if s < 0 {
849
                        return 0, errNegativeNotAllowed
850
                }
851
                return uint16(s), nil
852
        case int8:
853
                if s < 0 {
854
                        return 0, errNegativeNotAllowed
855
                }
856
                return uint16(s), nil
857
        case uint:
858
                r := uint16(s)
859
                if uint(r) != s {
860
                        return 0, castOverFlowError("uint", "uint16")
861
                }
862
                return r, nil
863
        case uint64:
864
                r := uint16(s)
865
                if uint64(r) != s {
866
                        return 0, castOverFlowError("uint64", "uint16")
867
                }
868
                return r, nil
869
        case uint32:
870
                r := uint16(s)
871
                if uint32(r) != s {
872
                        return 0, castOverFlowError("uint32", "uint16")
873
                }
874
                return r, nil
875
        case uint16:
876
                return s, nil
877
        case uint8:
878
                return uint16(s), nil
879
        case float64:
880
                if s < 0 {
881
                        return 0, errNegativeNotAllowed
882
                }
883
                u := int64(s)
884
                r := uint16(s)
885
                if int64(r) != u {
886
                        return 0, castOverFlowError("float64", "uint16")
887
                }
888
                return r, nil
889
        case float32:
890
                if s < 0 {
891
                        return 0, errNegativeNotAllowed
892
                }
893
                u := int32(s)
894
                r := uint16(s)
895
                if int32(r) != u {
896
                        return 0, castOverFlowError("float32", "uint16")
897
                }
898
                return r, nil
899
        case bool:
900
                if s {
901
                        return 1, nil
902
                }
903
                return 0, nil
904
        case nil:
905
                return 0, nil
906
        default:
907
                return 0, fmt.Errorf("unable to cast %#v of type %T to uint16", i, i)
908
        }
909
}
func ToInt32E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

184
func ToInt32E(i interface{}) (int32, error) {
185
        i = Indirect(i)
186
        
187
        switch s := i.(type) {
188
        case int:
189
                r := int32(s)
190
                if int(r) != s {
191
                        return 0, castOverFlowError("int", "int32")
192
                }
193
                return r, nil
194
        case int64:
195
                r := int32(s)
196
                if int64(r) != s {
197
                        return 0, castOverFlowError("int64", "int32")
198
                }
199
                return r, nil
200
        case int32:
201
                return s, nil
202
        case int16:
203
                return int32(s), nil
204
        case int8:
205
                return int32(s), nil
206
        case uint:
207
                r := int32(s)
208
                if uint(r) != s {
209
                        return 0, castOverFlowError("uint", "int32")
210
                }
211
                return r, nil
212
        case uint64:
213
                r := int32(s)
214
                if uint64(r) != s {
215
                        return 0, castOverFlowError("uint64", "int32")
216
                }
217
                return r, nil
218
        case uint32:
219
                r := int32(s)
220
                if uint32(r) != s {
221
                        return 0, castOverFlowError("uint32", "int32")
222
                }
223
                return r, nil
224
        case uint16:
225
                return int32(s), nil
226
        case uint8:
227
                return int32(s), nil
228
        case float64:
229
                return int32(s), nil
230
        case float32:
231
                return int32(s), nil
232
        case string:
233
                v, err := strconv.ParseInt(s, 0, 0)
234
                if err != nil {
235
                        return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i)
236
                }
237
                r := int32(v)
238
                d, err := decimal.NewFromString(s)
239
                if err != nil {
240
                        return 0, err
241
                }
242
                if !d.Equal(decimal.NewFromInt32(r)) {
243
                        return 0, castOverFlowError("string", "32")
244
                }
245
                return r, nil
246
        case bool:
247
                if s {
248
                        return 1, nil
249
                }
250
                return 0, nil
251
        case nil:
252
                return 0, nil
253
        default:
254
                return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i)
255
        }
256
}
func ToUint8E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

912
func ToUint8E(i interface{}) (uint8, error) {
913
        i = Indirect(i)
914
        
915
        switch s := i.(type) {
916
        case string:
917
                v, err := strconv.ParseUint(s, 0, 8)
918
                if err != nil {
919
                        return 0, fmt.Errorf("unable to cast %#v to uint8: %s", i, err)
920
                }
921
                d, err := decimal.NewFromString(s)
922
                if err != nil {
923
                        return 0, err
924
                }
925
                r := uint8(v)
926
                q, _ := decimal.NewFromString(fmt.Sprintf("%d", r))
927
                if !d.Equal(q) {
928
                        return 0, castOverFlowError("string", "uint8")
929
                }
930
                return r, nil
931
        case int:
932
                if s < 0 {
933
                        return 0, errNegativeNotAllowed
934
                }
935
                r := uint8(s)
936
                if int(r) != s {
937
                        return 0, castOverFlowError("int", "uint8")
938
                }
939
                return r, nil
940
        case int64:
941
                if s < 0 {
942
                        return 0, errNegativeNotAllowed
943
                }
944
                r := uint8(s)
945
                if int64(r) != s {
946
                        return 0, castOverFlowError("int64", "uint8")
947
                }
948
                return r, nil
949
        case int32:
950
                if s < 0 {
951
                        return 0, errNegativeNotAllowed
952
                }
953
                r := uint8(s)
954
                if int32(r) != s {
955
                        return 0, castOverFlowError("int32", "uint8")
956
                }
957
                return r, nil
958
        case int16:
959
                if s < 0 {
960
                        return 0, errNegativeNotAllowed
961
                }
962
                r := uint8(s)
963
                if int16(r) != s {
964
                        return 0, castOverFlowError("int16", "uint8")
965
                }
966
                return r, nil
967
        case int8:
968
                if s < 0 {
969
                        return 0, errNegativeNotAllowed
970
                }
971
                return uint8(s), nil
972
        case uint:
973
                r := uint8(s)
974
                if uint(r) != s {
975
                        return 0, castOverFlowError("uint", "uint8")
976
                }
977
                return r, nil
978
        case uint64:
979
                r := uint8(s)
980
                if uint64(r) != s {
981
                        return 0, castOverFlowError("uint64", "uint8")
982
                }
983
                return r, nil
984
        case uint32:
985
                r := uint8(s)
986
                if uint32(r) != s {
987
                        return 0, castOverFlowError("uint32", "uint8")
988
                }
989
                return r, nil
990
        case uint16:
991
                r := uint8(s)
992
                if uint16(r) != s {
993
                        return 0, castOverFlowError("uint16", "uint8")
994
                }
995
                return r, nil
996
        case uint8:
997
                return s, nil
998
        case float64:
999
                if s < 0 {
1000
                        return 0, errNegativeNotAllowed
1001
                }
1002
                u := int64(s)
1003
                r := uint8(s)
1004
                if int64(r) != u {
1005
                        return 0, castOverFlowError("float64", "uint8")
1006
                }
1007
                return r, nil
1008
        case float32:
1009
                if s < 0 {
1010
                        return 0, errNegativeNotAllowed
1011
                }
1012
                u := int32(s)
1013
                r := uint8(s)
1014
                if int32(r) != u {
1015
                        return 0, castOverFlowError("float32", "uint8")
1016
                }
1017
                return r, nil
1018
        case bool:
1019
                if s {
1020
                        return 1, nil
1021
                }
1022
                return 0, nil
1023
        case nil:
1024
                return 0, nil
1025
        default:
1026
                return 0, fmt.Errorf("unable to cast %#v of type %T to uint8", i, i)
1027
        }
1028
}
func IsNil
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1179
func IsNil(val interface{}) bool {
1180
        if val == nil {
1181
                return true
1182
        }
1183
        rv := reflect.ValueOf(val)
1184
        switch rv.Kind() {
1185
        case reflect.Ptr, reflect.Func, reflect.Map, reflect.Slice, reflect.Interface:
1186
                return rv.IsNil()
1187
        }
1188
        return false
1189
}
func ToInt16E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

259
func ToInt16E(i interface{}) (int16, error) {
260
        i = Indirect(i)
261
        switch s := i.(type) {
262
        case int:
263
                r := int16(s)
264
                if int(r) != s {
265
                        return 0, castOverFlowError("int", "int16")
266
                }
267
                return r, nil
268
        case int64:
269
                r := int16(s)
270
                if int64(r) != s {
271
                        return 0, castOverFlowError("int64", "int16")
272
                }
273
                return r, nil
274
        case int32:
275
                r := int16(s)
276
                if int32(r) != s {
277
                        return 0, castOverFlowError("int32", "int16")
278
                }
279
                return r, nil
280
        case int16:
281
                return s, nil
282
        case int8:
283
                return int16(s), nil
284
        case uint:
285
                r := int16(s)
286
                if uint(r) != s {
287
                        return 0, castOverFlowError("uint", "int16")
288
                }
289
                return int16(s), nil
290
        case uint64:
291
                r := int16(s)
292
                if uint64(r) != s {
293
                        return 0, castOverFlowError("uint64", "int16")
294
                }
295
                return r, nil
296
        case uint32:
297
                r := int16(s)
298
                if uint32(r) != s {
299
                        return 0, castOverFlowError("uint32", "int16")
300
                }
301
                return r, nil
302
        case uint16:
303
                r := int16(s)
304
                if uint16(r) != s {
305
                        return 0, castOverFlowError("uint64", "int16")
306
                }
307
                return r, nil
308
        case uint8:
309
                return int16(s), nil
310
        case float64:
311
                u := int64(s)
312
                r := int16(s)
313
                if int64(r) != u {
314
                        return 0, castOverFlowError("float64", "int16")
315
                }
316
                return r, nil
317
        case float32:
318
                u := int32(s)
319
                r := int16(s)
320
                if int32(r) != u {
321
                        return 0, castOverFlowError("float32", "int16")
322
                }
323
                return r, nil
324
        case string:
325
                v, err := strconv.ParseInt(s, 0, 0)
326
                if err != nil {
327
                        return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i)
328
                }
329
                r := int16(v)
330
                d, err := decimal.NewFromString(s)
331
                if err != nil {
332
                        return 0, err
333
                }
334
                if !d.Equal(decimal.NewFromInt32(int32(r))) {
335
                        return 0, castOverFlowError("string", "int16")
336
                }
337
                return r, nil
338
        case bool:
339
                if s {
340
                        return 1, nil
341
                }
342
                return 0, nil
343
        case nil:
344
                return 0, nil
345
        default:
346
                return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i)
347
        }
348
}
func ToIntE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

452
func ToIntE(i interface{}) (int, error) {
453
        i = Indirect(i)
454
        
455
        switch s := i.(type) {
456
        case int:
457
                return s, nil
458
        case int64:
459
                r := int(s)
460
                if int64(r) != s {
461
                        return 0, castOverFlowError("int64", "int")
462
                }
463
                return r, nil
464
        case int32:
465
                r := int(s)
466
                if int32(r) != s {
467
                        return 0, castOverFlowError("int64", "int")
468
                }
469
                return r, nil
470
        case int16:
471
                return int(s), nil
472
        case int8:
473
                return int(s), nil
474
        case uint:
475
                r := int(s)
476
                if uint(r) != s {
477
                        return 0, castOverFlowError("uint", "int")
478
                }
479
                return r, nil
480
        case uint64:
481
                r := int(s)
482
                if uint64(r) != s {
483
                        return 0, castOverFlowError("uint64", "int")
484
                }
485
                return r, nil
486
        case uint32:
487
                r := int(s)
488
                if uint32(r) != s {
489
                        return 0, castOverFlowError("uint32", "int")
490
                }
491
                return r, nil
492
        case uint16:
493
                return int(s), nil
494
        case uint8:
495
                return int(s), nil
496
        case float64:
497
                u := int64(s)
498
                r := int(s)
499
                if int64(r) != u {
500
                        return 0, castOverFlowError("float64", "int")
501
                }
502
                return r, nil
503
        case float32:
504
                u := int32(s)
505
                r := int(s)
506
                if int32(r) != u {
507
                        return 0, castOverFlowError("float32", "int8")
508
                }
509
                return r, nil
510
        case string:
511
                v, err := strconv.ParseInt(s, 0, 0)
512
                if err != nil {
513
                        return 0, fmt.Errorf("unable to cast %#v of type %T to int", i, i)
514
                }
515
                r := int(v)
516
                d, err := decimal.NewFromString(s)
517
                if err != nil {
518
                        return 0, err
519
                }
520
                if !d.Equal(decimal.NewFromInt(int64(r))) {
521
                        return 0, castOverFlowError("string", "int")
522
                }
523
                return r, nil
524
        case bool:
525
                if s {
526
                        return 1, nil
527
                }
528
                return 0, nil
529
        case nil:
530
                return 0, nil
531
        default:
532
                return 0, fmt.Errorf("unable to cast %#v of type %T to int", i, i)
533
        }
534
}
func ToInt8E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

351
func ToInt8E(i interface{}) (int8, error) {
352
        i = Indirect(i)
353
        
354
        switch s := i.(type) {
355
        case int:
356
                r := int8(s)
357
                if int(r) != s {
358
                        return 0, castOverFlowError("int", "int8")
359
                }
360
                return r, nil
361
        case int64:
362
                r := int8(s)
363
                if int64(r) != s {
364
                        return 0, castOverFlowError("int64", "int8")
365
                }
366
                return r, nil
367
        case int32:
368
                r := int8(s)
369
                if int32(r) != s {
370
                        return 0, castOverFlowError("int32", "int8")
371
                }
372
                return r, nil
373
        case int16:
374
                r := int8(s)
375
                if int16(r) != s {
376
                        return 0, castOverFlowError("int16", "int8")
377
                }
378
                return r, nil
379
        case int8:
380
                return s, nil
381
        case uint:
382
                r := int8(s)
383
                if uint(r) != s {
384
                        return 0, castOverFlowError("uint", "int8")
385
                }
386
                return r, nil
387
        case uint64:
388
                r := int8(s)
389
                if uint64(r) != s {
390
                        return 0, castOverFlowError("uint64", "int8")
391
                }
392
                return r, nil
393
        case uint32:
394
                r := int8(s)
395
                if uint32(r) != s {
396
                        return 0, castOverFlowError("uint32", "int8")
397
                }
398
                return r, nil
399
        case uint16:
400
                r := int8(s)
401
                if uint16(r) != s {
402
                        return 0, castOverFlowError("uint16", "int8")
403
                }
404
                return r, nil
405
        case uint8:
406
                r := int8(s)
407
                if uint8(r) != s {
408
                        return 0, castOverFlowError("uint8", "int8")
409
                }
410
                return r, nil
411
        case float64:
412
                u := int64(s)
413
                r := int8(s)
414
                if int64(r) != u {
415
                        return 0, castOverFlowError("float64", "int8")
416
                }
417
                return r, nil
418
        case float32:
419
                u := int32(s)
420
                r := int8(s)
421
                if int32(r) != u {
422
                        return 0, castOverFlowError("float32", "int8")
423
                }
424
                return r, nil
425
        case string:
426
                v, err := strconv.ParseInt(s, 0, 0)
427
                if err != nil {
428
                        return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i)
429
                }
430
                r := int8(v)
431
                d, err := decimal.NewFromString(s)
432
                if err != nil {
433
                        return 0, err
434
                }
435
                if !d.Equal(decimal.NewFromInt32(int32(r))) {
436
                        return 0, castOverFlowError("string", "int8")
437
                }
438
                return r, nil
439
        case bool:
440
                if s {
441
                        return 1, nil
442
                }
443
                return 0, nil
444
        case nil:
445
                return 0, nil
446
        default:
447
                return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i)
448
        }
449
}
func ToDecimalE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1030
func ToDecimalE(v interface{}) (decimal.Decimal, error) {
1031
        s, err := ToStringE(v)
1032
        if err != nil {
1033
                return decimal.Decimal{}, err
1034
        }
1035
        if s == "" {
1036
                return decimal.Zero, nil
1037
        }
1038
        d, err := decimal.NewFromString(s)
1039
        if err != nil {
1040
                return decimal.Decimal{}, err
1041
        }
1042
        return d, nil
1043
}
func DivInt32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

394
func DivInt32E(a, b int32) (r int32, err error) {
395
        r1, err := DivInt64E(int64(a), int64(b))
396
        if err != nil {
397
                return
398
        }
399
        r = int32(r1)
400
        if int64(r) != r1 {
401
                err = resultOverFlowError("int32")
402
                return
403
        }
404
        return
405
}
func SubInt8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

264
func SubInt8E(a, b int8) (r int8, err error) {
265
        r1, err := SubInt64E(int64(a), int64(b))
266
        if err != nil {
267
                return
268
        }
269
        r = int8(r1)
270
        if int64(r) != r1 {
271
                err = resultOverFlowError("int8")
272
                return
273
        }
274
        return
275
}
func MulIntE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

225
func MulIntE(a, b int) (r int, err error) {
226
        r1, err := MulInt64E(int64(a), int64(b))
227
        if err != nil {
228
                return
229
        }
230
        r = int(r1)
231
        if int64(r) != r1 {
232
                err = resultOverFlowError("int")
233
                return
234
        }
235
        return
236
}
func DivIntE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

238
func DivIntE(a, b int) (r int, err error) {
239
        r1, err := DivInt64E(int64(a), int64(b))
240
        if err != nil {
241
                return
242
        }
243
        r = int(r1)
244
        if int64(r) != r1 {
245
                err = resultOverFlowError("int")
246
                return
247
        }
248
        return
249
}
func MulInt16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

329
func MulInt16E(a, b int16) (r int16, err error) {
330
        r1, err := MulInt64E(int64(a), int64(b))
331
        if err != nil {
332
                return
333
        }
334
        r = int16(r1)
335
        if int64(r) != r1 {
336
                err = resultOverFlowError("int16")
337
                return
338
        }
339
        return
340
}
func AddIntE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

199
func AddIntE(a, b int) (r int, err error) {
200
        r1, err := AddInt64E(int64(a), int64(b))
201
        if err != nil {
202
                return
203
        }
204
        r = int(r1)
205
        if int64(r) != r1 {
206
                err = resultOverFlowError("int")
207
                return
208
        }
209
        return
210
}
func ToBinOperandE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1191
func ToBinOperandE(left, right interface{}) (o1, o2 interface{}, err error) {
1192
        
1193
        _nil := false
1194
        
1195
        if IsNil(left) {
1196
                _nil = true
1197
        } else {
1198
                o1 = Indirect(left)
1199
        }
1200
        
1201
        if IsNil(right) {
1202
                _nil = true
1203
        } else {
1204
                o2 = Indirect(right)
1205
        }
1206
        
1207
        if _nil {
1208
                return
1209
        }
1210
        
1211
        switch left.(type) {
1212
        case int:
1213
                o2, err = ToIntE(right)
1214
        case int8:
1215
                o2, err = ToInt8E(right)
1216
        case int16:
1217
                o2, err = ToInt16E(right)
1218
        case int32:
1219
                o2, err = ToInt32E(right)
1220
        case int64:
1221
                o2, err = ToInt64E(right)
1222
        case uint:
1223
                o2, err = ToUintE(right)
1224
        case uint8:
1225
                o2, err = ToUint8E(right)
1226
        case uint16:
1227
                o2, err = ToUint16E(right)
1228
        case uint32:
1229
                o2, err = ToUint32E(right)
1230
        case uint64:
1231
                o2, err = ToUint64E(right)
1232
        case decimal.Decimal:
1233
                o2, err = ToDecimalE(right)
1234
        case string:
1235
                o2, err = ToStringE(right)
1236
        default:
1237
                err = fmt.Errorf("cant't convert")
1238
        }
1239
        if err != nil {
1240
                return nil, nil, fmt.Errorf("operand types are different and %s", err)
1241
        }
1242
        
1243
        return left, o2, nil
1244
}
func DivAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

716
func DivAnyE(left, right interface{}) (interface{}, error) {
717
        o1, o2, err := ToBinOperandE(left, right)
718
        if err != nil {
719
                return nil, err
720
        }
721
        switch s := o1.(type) {
722
        case int:
723
                return DivIntE(o1.(int), o2.(int))
724
        case int8:
725
                return DivInt8E(o1.(int8), o2.(int8))
726
        case int16:
727
                return DivInt16E(o1.(int16), o2.(int16))
728
        case int32:
729
                return DivInt32E(o1.(int32), o2.(int32))
730
        case int64:
731
                return DivInt64E(o1.(int64), o2.(int64))
732
        case uint:
733
                return DivUintE(o1.(uint), o2.(uint))
734
        case uint8:
735
                return DivUint8E(o1.(uint8), o2.(uint8))
736
        case uint16:
737
                return DivUint16E(o1.(uint16), o2.(uint16))
738
        case uint32:
739
                return DivUint32E(o1.(uint32), o2.(uint32))
740
        case uint64:
741
                return DivUint64E(o1.(uint64), o2.(uint64))
742
        case decimal.Decimal:
743
                return o1.(decimal.Decimal).Div(o2.(decimal.Decimal)), nil
744
        default:
745
                return nil, fmt.Errorf("unsupport div type '%s'", s)
746
        }
747
}
func MulAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

683
func MulAnyE(left, right interface{}) (interface{}, error) {
684
        o1, o2, err := ToBinOperandE(left, right)
685
        if err != nil {
686
                return nil, err
687
        }
688
        switch s := o1.(type) {
689
        case int:
690
                return MulIntE(o1.(int), o2.(int))
691
        case int8:
692
                return MulInt8E(o1.(int8), o2.(int8))
693
        case int16:
694
                return MulInt16E(o1.(int16), o2.(int16))
695
        case int32:
696
                return MulInt32E(o1.(int32), o2.(int32))
697
        case int64:
698
                return MulInt64E(o1.(int64), o2.(int64))
699
        case uint:
700
                return MulUintE(o1.(uint), o2.(uint))
701
        case uint8:
702
                return MulUint8E(o1.(uint8), o2.(uint8))
703
        case uint16:
704
                return MulUint16E(o1.(uint16), o2.(uint16))
705
        case uint32:
706
                return MulUint32E(o1.(uint32), o2.(uint32))
707
        case uint64:
708
                return MulUint64E(o1.(uint64), o2.(uint64))
709
        case decimal.Decimal:
710
                return o1.(decimal.Decimal).Mul(o2.(decimal.Decimal)), nil
711
        default:
712
                return nil, fmt.Errorf("unsupport mul type '%s'", s)
713
        }
714
}
func AddAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

615
func AddAnyE(left, right interface{}) (interface{}, error) {
616
        o1, o2, err := ToBinOperandE(left, right)
617
        if err != nil {
618
                return nil, err
619
        }
620
        switch s := o1.(type) {
621
        case int:
622
                return AddIntE(o1.(int), o2.(int))
623
        case int8:
624
                return AddInt8E(o1.(int8), o2.(int8))
625
        case int16:
626
                return AddInt16E(o1.(int16), o2.(int16))
627
        case int32:
628
                return AddInt32E(o1.(int32), o2.(int32))
629
        case int64:
630
                return AddInt64E(o1.(int64), o2.(int64))
631
        case uint:
632
                return AddUintE(o1.(uint), o2.(uint))
633
        case uint8:
634
                return AddUint8E(o1.(uint8), o2.(uint8))
635
        case uint16:
636
                return AddUint16E(o1.(uint16), o2.(uint16))
637
        case uint32:
638
                return AddUint32E(o1.(uint32), o2.(uint32))
639
        case uint64:
640
                return AddUint64E(o1.(uint64), o2.(uint64))
641
        case decimal.Decimal:
642
                return o1.(decimal.Decimal).Add(o2.(decimal.Decimal)), nil
643
        case string:
644
                return o1.(string) + o2.(string), nil
645
        default:
646
                return nil, fmt.Errorf("unsupport add type '%s'", s)
647
        }
648
}
func SubAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

650
func SubAnyE(left, right interface{}) (interface{}, error) {
651
        o1, o2, err := ToBinOperandE(left, right)
652
        if err != nil {
653
                return nil, err
654
        }
655
        switch s := o1.(type) {
656
        case int:
657
                return SubIntE(o1.(int), o2.(int))
658
        case int8:
659
                return SubInt8E(o1.(int8), o2.(int8))
660
        case int16:
661
                return SubInt16E(o1.(int16), o2.(int16))
662
        case int32:
663
                return SubInt32E(o1.(int32), o2.(int32))
664
        case int64:
665
                return SubInt64E(o1.(int64), o2.(int64))
666
        case uint:
667
                return SubUintE(o1.(uint), o2.(uint))
668
        case uint8:
669
                return SubUint8E(o1.(uint8), o2.(uint8))
670
        case uint16:
671
                return SubUint16E(o1.(uint16), o2.(uint16))
672
        case uint32:
673
                return SubUint32E(o1.(uint32), o2.(uint32))
674
        case uint64:
675
                return SubUint64E(o1.(uint64), o2.(uint64))
676
        case decimal.Decimal:
677
                return o1.(decimal.Decimal).Sub(o2.(decimal.Decimal)), nil
678
        default:
679
                return nil, fmt.Errorf("unsupport sub type '%s'", s)
680
        }
681
}
func ToBoolE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

55
func ToBoolE(i interface{}) (bool, error) {
56
        i = Indirect(i)
57
        
58
        switch b := i.(type) {
59
        case bool:
60
                return b, nil
61
        case nil:
62
                return false, nil
63
        case int:
64
                if i.(int) != 0 {
65
                        return true, nil
66
                }
67
                return false, nil
68
        case int8:
69
                if i.(int8) != 0 {
70
                        return true, nil
71
                }
72
                return false, nil
73
        case int16:
74
                if i.(int16) != 0 {
75
                        return true, nil
76
                }
77
                return false, nil
78
        case int32:
79
                if i.(int32) != 0 {
80
                        return true, nil
81
                }
82
                return false, nil
83
        case int64:
84
                if i.(int64) != 0 {
85
                        return true, nil
86
                }
87
                return false, nil
88
        case uint:
89
                if i.(uint) != 0 {
90
                        return true, nil
91
                }
92
                return false, nil
93
        case uint8:
94
                if i.(uint8) != 0 {
95
                        return true, nil
96
                }
97
                return false, nil
98
        case uint16:
99
                if i.(uint16) != 0 {
100
                        return true, nil
101
                }
102
                return false, nil
103
        case uint32:
104
                if i.(uint32) != 0 {
105
                        return true, nil
106
                }
107
                return false, nil
108
        case uint64:
109
                if i.(uint64) != 0 {
110
                        return true, nil
111
                }
112
                return false, nil
113
        case decimal.Decimal:
114
                return !i.(decimal.Decimal).Equal(decimal.Zero), nil
115
        case string:
116
                return strconv.ParseBool(i.(string))
117
        default:
118
                return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i)
119
        }
120
}
func ToFloat32E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1292
func ToFloat32E(i interface{}) (float32, error) {
1293
        i = Indirect(i)
1294
        
1295
        switch s := i.(type) {
1296
        case float64:
1297
                return float32(s), nil
1298
        case float32:
1299
                return s, nil
1300
        case int:
1301
                return float32(s), nil
1302
        case int64:
1303
                return float32(s), nil
1304
        case int32:
1305
                return float32(s), nil
1306
        case int16:
1307
                return float32(s), nil
1308
        case int8:
1309
                return float32(s), nil
1310
        case uint:
1311
                return float32(s), nil
1312
        case uint64:
1313
                return float32(s), nil
1314
        case uint32:
1315
                return float32(s), nil
1316
        case uint16:
1317
                return float32(s), nil
1318
        case uint8:
1319
                return float32(s), nil
1320
        case string:
1321
                v, err := strconv.ParseFloat(s, 32)
1322
                if err == nil {
1323
                        return float32(v), nil
1324
                }
1325
                return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i)
1326
        case bool:
1327
                if s {
1328
                        return 1, nil
1329
                }
1330
                return 0, nil
1331
        case nil:
1332
                return 0, nil
1333
        default:
1334
                return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i)
1335
        }
1336
}
func ToFloat64E
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1247
func ToFloat64E(i interface{}) (float64, error) {
1248
        i = Indirect(i)
1249
        
1250
        switch s := i.(type) {
1251
        case float64:
1252
                return s, nil
1253
        case float32:
1254
                return float64(s), nil
1255
        case int:
1256
                return float64(s), nil
1257
        case int64:
1258
                return float64(s), nil
1259
        case int32:
1260
                return float64(s), nil
1261
        case int16:
1262
                return float64(s), nil
1263
        case int8:
1264
                return float64(s), nil
1265
        case uint:
1266
                return float64(s), nil
1267
        case uint64:
1268
                return float64(s), nil
1269
        case uint32:
1270
                return float64(s), nil
1271
        case uint16:
1272
                return float64(s), nil
1273
        case uint8:
1274
                return float64(s), nil
1275
        case string:
1276
                v, err := strconv.ParseFloat(s, 64)
1277
                if err == nil {
1278
                        return v, nil
1279
                }
1280
                return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i)
1281
        case bool:
1282
                if s {
1283
                        return 1, nil
1284
                }
1285
                return 0, nil
1286
        default:
1287
                return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i)
1288
        }
1289
}
func ToReflectTypeE
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1140
func ToReflectTypeE(_type reflect.Type, operand interface{}) (interface{}, error) {
1141
        var err error
1142
        var result interface{}
1143
        switch _type.Kind() {
1144
        case reflect.Int8:
1145
                result, err = ToInt8E(operand)
1146
        case reflect.Int16:
1147
                result, err = ToInt16E(operand)
1148
        case reflect.Int32:
1149
                result, err = ToInt32E(operand)
1150
        case reflect.Int64:
1151
                result, err = ToInt64E(operand)
1152
        case reflect.Uint:
1153
                result, err = ToUintE(operand)
1154
        case reflect.Uint8:
1155
                result, err = ToUint8E(operand)
1156
        case reflect.Uint16:
1157
                result, err = ToUint16E(operand)
1158
        case reflect.Uint32:
1159
                result, err = ToUint32E(operand)
1160
        case reflect.Uint64:
1161
                result, err = ToUint64E(operand)
1162
        case reflect.String:
1163
                result, err = ToStringE(operand)
1164
        case reflect.Interface:
1165
                result = operand
1166
        default:
1167
                if _type.Kind() == reflect.Struct && _type.Name() == "decimal.Decimal" {
1168
                        result, err = ToDecimalE(operand)
1169
                } else {
1170
                        return nil, fmt.Errorf("unsupport convert type '%s'", _type)
1171
                }
1172
        }
1173
        if err != nil {
1174
                return nil, fmt.Errorf("convert type '%s' error: %s", _type, err)
1175
        }
1176
        return result, nil
1177
}
func NotEqualAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1007
func NotEqualAnyE(left, right interface{}) (bool, error) {
1008
        
1009
        o1, o2, err := ToBinOperandE(left, right)
1010
        if err != nil {
1011
                return false, err
1012
        }
1013
        
1014
        if o1 == nil || o2 == nil {
1015
                return o1 != o2, nil
1016
        }
1017
        
1018
        switch s := o1.(type) {
1019
        case int:
1020
                return o1.(int) != o2.(int), nil
1021
        case int8:
1022
                return o1.(int8) != o2.(int8), nil
1023
        case int16:
1024
                return o1.(int16) != o2.(int16), nil
1025
        case int32:
1026
                return o1.(int32) != o2.(int32), nil
1027
        case int64:
1028
                return o1.(int64) != o2.(int64), nil
1029
        case uint:
1030
                return o1.(uint) != o2.(uint), nil
1031
        case uint8:
1032
                return o1.(uint8) != o2.(uint8), nil
1033
        case uint16:
1034
                return o1.(uint16) != o2.(uint16), nil
1035
        case uint32:
1036
                return o1.(uint32) != o2.(uint32), nil
1037
        case uint64:
1038
                return o1.(uint64) != o2.(uint64), nil
1039
        case string:
1040
                return o1.(string) != o2.(string), nil
1041
        case decimal.Decimal:
1042
                return !o1.(decimal.Decimal).Equal(o2.(decimal.Decimal)), nil
1043
        default:
1044
                return false, fmt.Errorf("unsupport not equal type '%s'", s)
1045
        }
1046
}
func EqualAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

966
func EqualAnyE(left, right interface{}) (bool, error) {
967
        
968
        o1, o2, err := ToBinOperandE(left, right)
969
        if err != nil {
970
                return false, err
971
        }
972
        
973
        if o1 == nil || o2 == nil {
974
                return o1 == o2, nil
975
        }
976
        
977
        switch s := o1.(type) {
978
        case int:
979
                return o1.(int) == o2.(int), nil
980
        case int8:
981
                return o1.(int8) == o2.(int8), nil
982
        case int16:
983
                return o1.(int16) == o2.(int16), nil
984
        case int32:
985
                return o1.(int32) == o2.(int32), nil
986
        case int64:
987
                return o1.(int64) == o2.(int64), nil
988
        case uint:
989
                return o1.(uint) == o2.(uint), nil
990
        case uint8:
991
                return o1.(uint8) == o2.(uint8), nil
992
        case uint16:
993
                return o1.(uint16) == o2.(uint16), nil
994
        case uint32:
995
                return o1.(uint32) == o2.(uint32), nil
996
        case uint64:
997
                return o1.(uint64) == o2.(uint64), nil
998
        case string:
999
                return o1.(string) == o2.(string), nil
1000
        case decimal.Decimal:
1001
                return o1.(decimal.Decimal).Equal(o2.(decimal.Decimal)), nil
1002
        default:
1003
                return false, fmt.Errorf("unsupport equal type '%s'", s)
1004
        }
1005
}
func UnaryMinusAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1223
func UnaryMinusAnyE(v interface{}) (interface{}, error) {
1224
        v = Indirect(v)
1225
        switch s := v.(type) {
1226
        case int:
1227
                return -v.(int), nil
1228
        case int8:
1229
                return -v.(int8), nil
1230
        case int16:
1231
                return -v.(int16), nil
1232
        case int32:
1233
                return -v.(int32), nil
1234
        case int64:
1235
                return -v.(int64), nil
1236
        case uint:
1237
                return -v.(uint), nil
1238
        case uint8:
1239
                return -v.(uint8), nil
1240
        case uint16:
1241
                return -v.(uint16), nil
1242
        case uint32:
1243
                return -v.(uint32), nil
1244
        case uint64:
1245
                return -v.(uint64), nil
1246
        case decimal.Decimal:
1247
                vv := v.(decimal.Decimal).String()
1248
                if strings.HasPrefix(vv, "-") {
1249
                        r, err := decimal.NewFromString(strings.TrimPrefix(vv, "-"))
1250
                        return r, err
1251
                } else {
1252
                        r, err := decimal.NewFromString("-" + vv)
1253
                        return r, err
1254
                }
1255
        default:
1256
                return false, fmt.Errorf("unsupport unary minus type '%s'", s)
1257
        }
1258
}
func UnaryPlusAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1188
func UnaryPlusAnyE(v interface{}) (interface{}, error) {
1189
        v = Indirect(v)
1190
        switch s := v.(type) {
1191
        case int:
1192
                return +v.(int), nil
1193
        case int8:
1194
                return +v.(int8), nil
1195
        case int16:
1196
                return +v.(int16), nil
1197
        case int32:
1198
                return +v.(int32), nil
1199
        case int64:
1200
                return +v.(int64), nil
1201
        case uint:
1202
                return +v.(uint), nil
1203
        case uint8:
1204
                return +v.(uint8), nil
1205
        case uint16:
1206
                return +v.(uint16), nil
1207
        case uint32:
1208
                return +v.(uint32), nil
1209
        case uint64:
1210
                return +v.(uint64), nil
1211
        case decimal.Decimal:
1212
                vv := v.(decimal.Decimal).String()
1213
                if strings.HasPrefix(vv, "-") {
1214
                        r, err := decimal.NewFromString(strings.TrimPrefix(vv, "-"))
1215
                        return r, err
1216
                }
1217
                return v.(decimal.Decimal), nil
1218
        default:
1219
                return false, fmt.Errorf("unsupport unary plus type '%s'", s)
1220
        }
1221
}
func GreaterAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1118
func GreaterAnyE(left, right interface{}) (bool, error) {
1119
        o1, o2, err := ToBinOperandE(left, right)
1120
        if err != nil {
1121
                return false, err
1122
        }
1123
        switch s := o1.(type) {
1124
        case int:
1125
                return o1.(int) > o2.(int), nil
1126
        case int8:
1127
                return o1.(int8) > o2.(int8), nil
1128
        case int16:
1129
                return o1.(int16) > o2.(int16), nil
1130
        case int32:
1131
                return o1.(int32) > o2.(int32), nil
1132
        case int64:
1133
                return o1.(int64) > o2.(int64), nil
1134
        case uint:
1135
                return o1.(uint) > o2.(uint), nil
1136
        case uint8:
1137
                return o1.(uint8) > o2.(uint8), nil
1138
        case uint16:
1139
                return o1.(uint16) > o2.(uint16), nil
1140
        case uint32:
1141
                return o1.(uint32) > o2.(uint32), nil
1142
        case uint64:
1143
                return o1.(uint64) > o2.(uint64), nil
1144
        case string:
1145
                return o1.(string) > o2.(string), nil
1146
        case decimal.Decimal:
1147
                return o1.(decimal.Decimal).GreaterThanOrEqual(o2.(decimal.Decimal)), nil
1148
        default:
1149
                return false, fmt.Errorf("unsupport greater type '%s'", s)
1150
        }
1151
}
func LessOrEqualAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1083
func LessOrEqualAnyE(left, right interface{}) (bool, error) {
1084
        o1, o2, err := ToBinOperandE(left, right)
1085
        if err != nil {
1086
                return false, err
1087
        }
1088
        switch s := o1.(type) {
1089
        case int:
1090
                return o1.(int) <= o2.(int), nil
1091
        case int8:
1092
                return o1.(int8) <= o2.(int8), nil
1093
        case int16:
1094
                return o1.(int16) <= o2.(int16), nil
1095
        case int32:
1096
                return o1.(int32) <= o2.(int32), nil
1097
        case int64:
1098
                return o1.(int64) <= o2.(int64), nil
1099
        case uint:
1100
                return o1.(uint) <= o2.(uint), nil
1101
        case uint8:
1102
                return o1.(uint8) <= o2.(uint8), nil
1103
        case uint16:
1104
                return o1.(uint16) <= o2.(uint16), nil
1105
        case uint32:
1106
                return o1.(uint32) <= o2.(uint32), nil
1107
        case uint64:
1108
                return o1.(uint64) <= o2.(uint64), nil
1109
        case string:
1110
                return o1.(string) <= o2.(string), nil
1111
        case decimal.Decimal:
1112
                return o1.(decimal.Decimal).LessThanOrEqual(o2.(decimal.Decimal)), nil
1113
        default:
1114
                return false, fmt.Errorf("unsupport less or equal type '%s'", s)
1115
        }
1116
}
func LessAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1048
func LessAnyE(left, right interface{}) (bool, error) {
1049
        o1, o2, err := ToBinOperandE(left, right)
1050
        if err != nil {
1051
                return false, err
1052
        }
1053
        switch s := o1.(type) {
1054
        case int:
1055
                return o1.(int) < o2.(int), nil
1056
        case int8:
1057
                return o1.(int8) < o2.(int8), nil
1058
        case int16:
1059
                return o1.(int16) < o2.(int16), nil
1060
        case int32:
1061
                return o1.(int32) < o2.(int32), nil
1062
        case int64:
1063
                return o1.(int64) < o2.(int64), nil
1064
        case uint:
1065
                return o1.(uint) < o2.(uint), nil
1066
        case uint8:
1067
                return o1.(uint8) < o2.(uint8), nil
1068
        case uint16:
1069
                return o1.(uint16) < o2.(uint16), nil
1070
        case uint32:
1071
                return o1.(uint32) < o2.(uint32), nil
1072
        case uint64:
1073
                return o1.(uint64) < o2.(uint64), nil
1074
        case string:
1075
                return o1.(string) < o2.(string), nil
1076
        case decimal.Decimal:
1077
                return o1.(decimal.Decimal).LessThan(o2.(decimal.Decimal)), nil
1078
        default:
1079
                return false, fmt.Errorf("unsupport less type '%s'", s)
1080
        }
1081
}
func GreaterOrEqualAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1153
func GreaterOrEqualAnyE(left, right interface{}) (bool, error) {
1154
        o1, o2, err := ToBinOperandE(left, right)
1155
        if err != nil {
1156
                return false, err
1157
        }
1158
        switch s := o1.(type) {
1159
        case int:
1160
                return o1.(int) >= o2.(int), nil
1161
        case int8:
1162
                return o1.(int8) >= o2.(int8), nil
1163
        case int16:
1164
                return o1.(int16) >= o2.(int16), nil
1165
        case int32:
1166
                return o1.(int32) >= o2.(int32), nil
1167
        case int64:
1168
                return o1.(int64) >= o2.(int64), nil
1169
        case uint:
1170
                return o1.(uint) >= o2.(uint), nil
1171
        case uint8:
1172
                return o1.(uint8) >= o2.(uint8), nil
1173
        case uint16:
1174
                return o1.(uint16) >= o2.(uint16), nil
1175
        case uint32:
1176
                return o1.(uint32) >= o2.(uint32), nil
1177
        case uint64:
1178
                return o1.(uint64) >= o2.(uint64), nil
1179
        case string:
1180
                return o1.(string) >= o2.(string), nil
1181
        case decimal.Decimal:
1182
                return o1.(decimal.Decimal).GreaterThanOrEqual(o2.(decimal.Decimal)), nil
1183
        default:
1184
                return false, fmt.Errorf("unsupport greater or equal type '%s'", s)
1185
        }
1186
}
func BitClearAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

935
func BitClearAnyE(left, right interface{}) (interface{}, error) {
936
        o1, o2, err := ToBinOperandE(left, right)
937
        if err != nil {
938
                return nil, err
939
        }
940
        switch s := o1.(type) {
941
        case int:
942
                return o1.(int) &^ o2.(int), nil
943
        case int8:
944
                return o1.(int8) &^ o2.(int8), nil
945
        case int16:
946
                return o1.(int16) &^ o2.(int16), nil
947
        case int32:
948
                return o1.(int32) &^ o2.(int32), nil
949
        case int64:
950
                return o1.(int64) &^ o2.(int64), nil
951
        case uint:
952
                return o1.(uint) &^ o2.(uint), nil
953
        case uint8:
954
                return o1.(uint8) &^ o2.(uint8), nil
955
        case uint16:
956
                return o1.(uint16) &^ o2.(uint16), nil
957
        case uint32:
958
                return o1.(uint32) &^ o2.(uint32), nil
959
        case uint64:
960
                return o1.(uint64) &^ o2.(uint64), nil
961
        default:
962
                return nil, fmt.Errorf("unsupport bit clear type '%s'", s)
963
        }
964
}
func LeftShiftAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

873
func LeftShiftAnyE(left, right interface{}) (interface{}, error) {
874
        o1, o2, err := ToBinOperandE(left, right)
875
        if err != nil {
876
                return nil, err
877
        }
878
        switch s := o1.(type) {
879
        case int:
880
                return o1.(int) << o2.(int), nil
881
        case int8:
882
                return o1.(int8) << o2.(int8), nil
883
        case int16:
884
                return o1.(int16) << o2.(int16), nil
885
        case int32:
886
                return o1.(int32) << o2.(int32), nil
887
        case int64:
888
                return o1.(int64) << o2.(int64), nil
889
        case uint:
890
                return o1.(uint) << o2.(uint), nil
891
        case uint8:
892
                return o1.(uint8) << o2.(uint8), nil
893
        case uint16:
894
                return o1.(uint16) << o2.(uint16), nil
895
        case uint32:
896
                return o1.(uint32) << o2.(uint32), nil
897
        case uint64:
898
                return o1.(uint64) << o2.(uint64), nil
899
        default:
900
                return nil, fmt.Errorf("unsupport left shift type '%s'", s)
901
        }
902
}
func RightShiftAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

904
func RightShiftAnyE(left, right interface{}) (interface{}, error) {
905
        o1, o2, err := ToBinOperandE(left, right)
906
        if err != nil {
907
                return nil, err
908
        }
909
        switch s := o1.(type) {
910
        case int:
911
                return o1.(int) >> o2.(int), nil
912
        case int8:
913
                return o1.(int8) >> o2.(int8), nil
914
        case int16:
915
                return o1.(int16) >> o2.(int16), nil
916
        case int32:
917
                return o1.(int32) >> o2.(int32), nil
918
        case int64:
919
                return o1.(int64) >> o2.(int64), nil
920
        case uint:
921
                return o1.(uint) >> o2.(uint), nil
922
        case uint8:
923
                return o1.(uint8) >> o2.(uint8), nil
924
        case uint16:
925
                return o1.(uint16) >> o2.(uint16), nil
926
        case uint32:
927
                return o1.(uint32) >> o2.(uint32), nil
928
        case uint64:
929
                return o1.(uint64) >> o2.(uint64), nil
930
        default:
931
                return nil, fmt.Errorf("unsupport right shift type '%s'", s)
932
        }
933
}
func ModAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

842
func ModAnyE(left, right interface{}) (interface{}, error) {
843
        o1, o2, err := ToBinOperandE(left, right)
844
        if err != nil {
845
                return nil, err
846
        }
847
        switch s := o1.(type) {
848
        case int:
849
                return o1.(int) % o2.(int), nil
850
        case int8:
851
                return o1.(int8) % o2.(int8), nil
852
        case int16:
853
                return o1.(int16) % o2.(int16), nil
854
        case int32:
855
                return o1.(int32) % o2.(int32), nil
856
        case int64:
857
                return o1.(int64) % o2.(int64), nil
858
        case uint:
859
                return o1.(uint) % o2.(uint), nil
860
        case uint8:
861
                return o1.(uint8) % o2.(uint8), nil
862
        case uint16:
863
                return o1.(uint16) % o2.(uint16), nil
864
        case uint32:
865
                return o1.(uint32) % o2.(uint32), nil
866
        case uint64:
867
                return o1.(uint64) % o2.(uint64), nil
868
        default:
869
                return nil, fmt.Errorf("unsupport mod type '%s'", s)
870
        }
871
}
func CaretAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

749
func CaretAnyE(left, right interface{}) (interface{}, error) {
750
        o1, o2, err := ToBinOperandE(left, right)
751
        if err != nil {
752
                return nil, err
753
        }
754
        switch s := o1.(type) {
755
        case int:
756
                return o1.(int) ^ o2.(int), nil
757
        case int8:
758
                return o1.(int8) ^ o2.(int8), nil
759
        case int16:
760
                return o1.(int16) ^ o2.(int16), nil
761
        case int32:
762
                return o1.(int32) ^ o2.(int32), nil
763
        case int64:
764
                return o1.(int64) ^ o2.(int64), nil
765
        case uint:
766
                return o1.(uint) ^ o2.(uint), nil
767
        case uint8:
768
                return o1.(uint8) ^ o2.(uint8), nil
769
        case uint16:
770
                return o1.(uint16) ^ o2.(uint16), nil
771
        case uint32:
772
                return o1.(uint32) ^ o2.(uint32), nil
773
        case uint64:
774
                return o1.(uint64) ^ o2.(uint64), nil
775
        default:
776
                return nil, fmt.Errorf("unsupport caret type '%s'", s)
777
        }
778
}
func OrAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

780
func OrAnyE(left, right interface{}) (interface{}, error) {
781
        o1, o2, err := ToBinOperandE(left, right)
782
        if err != nil {
783
                return nil, err
784
        }
785
        switch s := o1.(type) {
786
        case int:
787
                return o1.(int) | o2.(int), nil
788
        case int8:
789
                return o1.(int8) | o2.(int8), nil
790
        case int16:
791
                return o1.(int16) | o2.(int16), nil
792
        case int32:
793
                return o1.(int32) | o2.(int32), nil
794
        case int64:
795
                return o1.(int64) | o2.(int64), nil
796
        case uint:
797
                return o1.(uint) | o2.(uint), nil
798
        case uint8:
799
                return o1.(uint8) | o2.(uint8), nil
800
        case uint16:
801
                return o1.(uint16) | o2.(uint16), nil
802
        case uint32:
803
                return o1.(uint32) | o2.(uint32), nil
804
        case uint64:
805
                return o1.(uint64) | o2.(uint64), nil
806
        default:
807
                return nil, fmt.Errorf("unsupport or type '%s'", s)
808
        }
809
}
func AndAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

811
func AndAnyE(left, right interface{}) (interface{}, error) {
812
        o1, o2, err := ToBinOperandE(left, right)
813
        if err != nil {
814
                return nil, err
815
        }
816
        switch s := o1.(type) {
817
        case int:
818
                return o1.(int) & o2.(int), nil
819
        case int8:
820
                return o1.(int8) & o2.(int8), nil
821
        case int16:
822
                return o1.(int16) & o2.(int16), nil
823
        case int32:
824
                return o1.(int32) & o2.(int32), nil
825
        case int64:
826
                return o1.(int64) & o2.(int64), nil
827
        case uint:
828
                return o1.(uint) & o2.(uint), nil
829
        case uint8:
830
                return o1.(uint8) & o2.(uint8), nil
831
        case uint16:
832
                return o1.(uint16) & o2.(uint16), nil
833
        case uint32:
834
                return o1.(uint32) & o2.(uint32), nil
835
        case uint64:
836
                return o1.(uint64) & o2.(uint64), nil
837
        default:
838
                return nil, fmt.Errorf("unsupport and type '%s'", s)
839
        }
840
}
func UnaryCaretAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1260
func UnaryCaretAnyE(v interface{}) (interface{}, error) {
1261
        v = Indirect(v)
1262
        switch s := v.(type) {
1263
        case int:
1264
                return ^v.(int), nil
1265
        case int8:
1266
                return ^v.(int8), nil
1267
        case int16:
1268
                return ^v.(int16), nil
1269
        case int32:
1270
                return ^v.(int32), nil
1271
        case int64:
1272
                return ^v.(int64), nil
1273
        case uint:
1274
                return ^v.(uint), nil
1275
        case uint8:
1276
                return ^v.(uint8), nil
1277
        case uint16:
1278
                return ^v.(uint16), nil
1279
        case uint32:
1280
                return ^v.(uint32), nil
1281
        case uint64:
1282
                return ^v.(uint64), nil
1283
        default:
1284
                return false, fmt.Errorf("unsupport unary caret type '%s'", s)
1285
        }
1286
}
func DivUint16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

550
func DivUint16E(a, b uint16) (r uint16, err error) {
551
        r1, err := DivUint64E(uint64(a), uint64(b))
552
        if err != nil {
553
                return
554
        }
555
        r = uint16(r1)
556
        if uint64(r) != r1 {
557
                err = resultOverFlowError("uint16")
558
                return
559
        }
560
        return
561
}
func AddInt32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

355
func AddInt32E(a, b int32) (r int32, err error) {
356
        r1, err := AddInt64E(int64(a), int64(b))
357
        if err != nil {
358
                return
359
        }
360
        r = int32(r1)
361
        if int64(r) != r1 {
362
                err = resultOverFlowError("int32")
363
                return
364
        }
365
        return
366
}
func MulUint32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

589
func MulUint32E(a, b uint32) (r uint32, err error) {
590
        r1, err := DivUint64E(uint64(a), uint64(b))
591
        if err != nil {
592
                return
593
        }
594
        r = uint32(r1)
595
        if uint64(r) != r1 {
596
                err = resultOverFlowError("uint32")
597
                return
598
        }
599
        return
600
}
func SubUint32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

576
func SubUint32E(a, b uint32) (r uint32, err error) {
577
        r1, err := SubUint64E(uint64(a), uint64(b))
578
        if err != nil {
579
                return
580
        }
581
        r = uint32(r1)
582
        if uint64(r) != r1 {
583
                err = resultOverFlowError("uint32")
584
                return
585
        }
586
        return
587
}
func AddUint32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

563
func AddUint32E(a, b uint32) (r uint32, err error) {
564
        r1, err := AddUint64E(uint64(a), uint64(b))
565
        if err != nil {
566
                return
567
        }
568
        r = uint32(r1)
569
        if uint64(r) != r1 {
570
                err = resultOverFlowError("uint32")
571
                return
572
        }
573
        return
574
}
func MulUint16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

537
func MulUint16E(a, b uint16) (r uint16, err error) {
538
        r1, err := MulUint64E(uint64(a), uint64(b))
539
        if err != nil {
540
                return
541
        }
542
        r = uint16(r1)
543
        if uint64(r) != r1 {
544
                err = resultOverFlowError("uint16")
545
                return
546
        }
547
        return
548
}
func SubUint16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

524
func SubUint16E(a, b uint16) (r uint16, err error) {
525
        r1, err := SubUint64E(uint64(a), uint64(b))
526
        if err != nil {
527
                return
528
        }
529
        r = uint16(r1)
530
        if uint64(r) != r1 {
531
                err = resultOverFlowError("uint16")
532
                return
533
        }
534
        return
535
}
func AddUint16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

511
func AddUint16E(a, b uint16) (r uint16, err error) {
512
        r1, err := AddUint64E(uint64(a), uint64(b))
513
        if err != nil {
514
                return
515
        }
516
        r = uint16(r1)
517
        if uint64(r) != r1 {
518
                err = resultOverFlowError("uint16")
519
                return
520
        }
521
        return
522
}
func DivUint8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

498
func DivUint8E(a, b uint8) (r uint8, err error) {
499
        r1, err := DivUint64E(uint64(a), uint64(b))
500
        if err != nil {
501
                return
502
        }
503
        r = uint8(r1)
504
        if uint64(r) != r1 {
505
                err = resultOverFlowError("uint8")
506
                return
507
        }
508
        return
509
}
func MulUint8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

485
func MulUint8E(a, b uint8) (r uint8, err error) {
486
        r1, err := MulUint64E(uint64(a), uint64(b))
487
        if err != nil {
488
                return
489
        }
490
        r = uint8(r1)
491
        if uint64(r) != r1 {
492
                err = resultOverFlowError("uint8")
493
                return
494
        }
495
        return
496
}
func SubUint8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

472
func SubUint8E(a, b uint8) (r uint8, err error) {
473
        r1, err := SubUint64E(uint64(a), uint64(b))
474
        if err != nil {
475
                return
476
        }
477
        r = uint8(r1)
478
        if uint64(r) != r1 {
479
                err = resultOverFlowError("uint8")
480
                return
481
        }
482
        return
483
}
func AddUint8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

459
func AddUint8E(a, b uint8) (r uint8, err error) {
460
        r1, err := AddUint64E(uint64(a), uint64(b))
461
        if err != nil {
462
                return
463
        }
464
        r = uint8(r1)
465
        if uint64(r) != r1 {
466
                err = resultOverFlowError("uint8")
467
                return
468
        }
469
        return
470
}
func DivUintE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

446
func DivUintE(a, b uint) (r uint, err error) {
447
        r1, err := DivUint64E(uint64(a), uint64(b))
448
        if err != nil {
449
                return
450
        }
451
        r = uint(r1)
452
        if uint64(r) != r1 {
453
                err = resultOverFlowError("uint")
454
                return
455
        }
456
        return
457
}
func SubIntE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

212
func SubIntE(a, b int) (r int, err error) {
213
        r1, err := SubInt64E(int64(a), int64(b))
214
        if err != nil {
215
                return
216
        }
217
        r = int(r1)
218
        if int64(r) != r1 {
219
                err = resultOverFlowError("int")
220
                return
221
        }
222
        return
223
}
func AddInt8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

251
func AddInt8E(a, b int8) (r int8, err error) {
252
        r1, err := AddInt64E(int64(a), int64(b))
253
        if err != nil {
254
                return
255
        }
256
        r = int8(r1)
257
        if int64(r) != r1 {
258
                err = resultOverFlowError("int8")
259
                return
260
        }
261
        return
262
}
func MulInt8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

277
func MulInt8E(a, b int8) (r int8, err error) {
278
        r1, err := MulInt64E(int64(a), int64(b))
279
        if err != nil {
280
                return
281
        }
282
        r = int8(r1)
283
        if int64(r) != r1 {
284
                err = resultOverFlowError("int8")
285
                return
286
        }
287
        return
288
}
func MulUintE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

433
func MulUintE(a, b uint) (r uint, err error) {
434
        r1, err := MulUint64E(uint64(a), uint64(b))
435
        if err != nil {
436
                return
437
        }
438
        r = uint(r1)
439
        if uint64(r) != r1 {
440
                err = resultOverFlowError("uint")
441
                return
442
        }
443
        return
444
}
func SubUintE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

420
func SubUintE(a, b uint) (r uint, err error) {
421
        r1, err := SubUint64E(uint64(a), uint64(b))
422
        if err != nil {
423
                return
424
        }
425
        r = uint(r1)
426
        if uint64(r) != r1 {
427
                err = resultOverFlowError("uint")
428
                return
429
        }
430
        return
431
}
func AddUintE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

407
func AddUintE(a, b uint) (r uint, err error) {
408
        r1, err := AddUint64E(uint64(a), uint64(b))
409
        if err != nil {
410
                return
411
        }
412
        r = uint(r1)
413
        if uint64(r) != r1 {
414
                err = resultOverFlowError("uint")
415
                return
416
        }
417
        return
418
}
func MulInt32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

381
func MulInt32E(a, b int32) (r int32, err error) {
382
        r1, err := MulInt64E(int64(a), int64(b))
383
        if err != nil {
384
                return
385
        }
386
        r = int32(r1)
387
        if int64(r) != r1 {
388
                err = resultOverFlowError("int32")
389
                return
390
        }
391
        return
392
}
func SubInt32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

368
func SubInt32E(a, b int32) (r int32, err error) {
369
        r1, err := SubInt64E(int64(a), int64(b))
370
        if err != nil {
371
                return
372
        }
373
        r = int32(r1)
374
        if int64(r) != r1 {
375
                err = resultOverFlowError("int32")
376
                return
377
        }
378
        return
379
}
func DivUint32E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

602
func DivUint32E(a, b uint32) (r uint32, err error) {
603
        r1, err := DivUint64E(uint64(a), uint64(b))
604
        if err != nil {
605
                return
606
        }
607
        r = uint32(r1)
608
        if uint64(r) != r1 {
609
                err = resultOverFlowError("uint32")
610
                return
611
        }
612
        return
613
}
func DivInt16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

342
func DivInt16E(a, b int16) (r int16, err error) {
343
        r1, err := DivInt64E(int64(a), int64(b))
344
        if err != nil {
345
                return
346
        }
347
        r = int16(r1)
348
        if int64(r) != r1 {
349
                err = resultOverFlowError("int16")
350
                return
351
        }
352
        return
353
}
func SubInt16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

316
func SubInt16E(a, b int16) (r int16, err error) {
317
        r1, err := SubInt64E(int64(a), int64(b))
318
        if err != nil {
319
                return
320
        }
321
        r = int16(r1)
322
        if int64(r) != r1 {
323
                err = resultOverFlowError("int16")
324
                return
325
        }
326
        return
327
}
func AddInt16E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

303
func AddInt16E(a, b int16) (r int16, err error) {
304
        r1, err := AddInt64E(int64(a), int64(b))
305
        if err != nil {
306
                return
307
        }
308
        r = int16(r1)
309
        if int64(r) != r1 {
310
                err = resultOverFlowError("int16")
311
                return
312
        }
313
        return
314
}
func DivInt8E
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

290
func DivInt8E(a, b int8) (r int8, err error) {
291
        r1, err := DivInt64E(int64(a), int64(b))
292
        if err != nil {
293
                return
294
        }
295
        r = int8(r1)
296
        if int64(r) != r1 {
297
                err = resultOverFlowError("int8")
298
                return
299
        }
300
        return
301
}
func LogicAndAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1298
func LogicAndAnyE(left, right interface{}) (bool, error) {
1299
        a, err := ToBoolE(left)
1300
        if err != nil {
1301
                return false, err
1302
        }
1303
        b, err := ToBoolE(right)
1304
        if err != nil {
1305
                return false, err
1306
        }
1307
        return a && b, nil
1308
}
func LogicOrAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1310
func LogicOrAnyE(left, right interface{}) (bool, error) {
1311
        a, err := ToBoolE(left)
1312
        if err != nil {
1313
                return false, err
1314
        }
1315
        b, err := ToBoolE(right)
1316
        if err != nil {
1317
                return false, err
1318
        }
1319
        return a || b, nil
1320
}
func BigDivUint64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

63
func BigDivUint64(a, b uint64) *big.Int {
64
        r := big.NewInt(0)
65
        ba := &big.Int{}
66
        ba.SetUint64(a)
67
        bb := &big.Int{}
68
        bb.SetUint64(b)
69
        return r.Div(ba, bb)
70
}
func BigSubUint64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

45
func BigSubUint64(a, b uint64) *big.Int {
46
        r := big.NewInt(0)
47
        ba := &big.Int{}
48
        ba.SetUint64(a)
49
        bb := &big.Int{}
50
        bb.SetUint64(b)
51
        return r.Sub(ba, bb)
52
}
func UnaryNotAnyE
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

1288
func UnaryNotAnyE(v interface{}) (interface{}, error) {
1289
        v = Indirect(v)
1290
        switch s := v.(type) {
1291
        case bool:
1292
                return !v.(bool), nil
1293
        default:
1294
                return false, fmt.Errorf("unsupport unary not type '%s'", s)
1295
        }
1296
}
func Value.Add
Back

In /Users/kun/gobatis/gobatis/cast/value.go:

9
func (p Value) Add(a Value) (err error) {
10
        
11
        switch p.Kind() {
12
        case reflect.Int8:
13
        
14
        }
15
        
16
        return
17
}
func jsonStringToObject
Back

In /Users/kun/gobatis/gobatis/cast/caste.go:

1383
func jsonStringToObject(s string, v interface{}) error {
1384
        data := []byte(s)
1385
        return json.Unmarshal(data, v)
1386
}
func BigDivInt64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

31
func BigDivInt64(a, b int64) *big.Int {
32
        r := big.NewInt(0)
33
        return r.Div(big.NewInt(a), big.NewInt(b))
34
}
func MulFloat32
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

96
func MulFloat32(a, b float32) (r decimal.Decimal) {
97
        return decimal.NewFromFloat32(a).Mul(decimal.NewFromFloat32(b))
98
}
func SubFloat64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

76
func SubFloat64(a, b float64) (r decimal.Decimal) {
77
        return decimal.NewFromFloat(a).Sub(decimal.NewFromFloat(b))
78
}
func AddFloat64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

72
func AddFloat64(a, b float64) (r decimal.Decimal) {
73
        return decimal.NewFromFloat(a).Add(decimal.NewFromFloat(b))
74
}
func MulFloat64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

80
func MulFloat64(a, b float64) (r decimal.Decimal) {
81
        return decimal.NewFromFloat(a).Mul(decimal.NewFromFloat(b))
82
}
func DivFloat64
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

84
func DivFloat64(a, b float64) (r decimal.Decimal) {
85
        return decimal.NewFromFloat(a).Div(decimal.NewFromFloat(b))
86
}
func AddFloat32
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

88
func AddFloat32(a, b float32) (r decimal.Decimal) {
89
        return decimal.NewFromFloat32(a).Add(decimal.NewFromFloat32(b))
90
}
func SubFloat32
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

92
func SubFloat32(a, b float32) (r decimal.Decimal) {
93
        return decimal.NewFromFloat32(a).Sub(decimal.NewFromFloat32(b))
94
}
func DivFloat32
Back

In /Users/kun/gobatis/gobatis/cast/calc.go:

100
func DivFloat32(a, b float32) (r decimal.Decimal) {
101
        return decimal.NewFromFloat32(a).Div(decimal.NewFromFloat32(b))
102
}
Package Overview: github.com/gobatis/gobatis/driver/postgres 93.3%

Please select a function to see what's left for testing.

Namer.TableName(...) github.com/gobatis/gobatis/driver/postgres/db.go 100.0% 4/4
Open(...) github.com/gobatis/gobatis/driver/postgres/db.go 100.0% 3/3
Namer.ColumnName(...) github.com/gobatis/gobatis/driver/postgres/db.go 100.0% 3/3
Dialector.Namer(...) github.com/gobatis/gobatis/driver/postgres/db.go 100.0% 1/1
Dialector.DB(...) github.com/gobatis/gobatis/driver/postgres/db.go 100.0% 1/1
Namer.ReservedName(...) github.com/gobatis/gobatis/driver/postgres/db.go 66.7% 2/3
func Namer.TableName
Back

In /Users/kun/gobatis/gobatis/driver/postgres/db.go:

39
func (n Namer) TableName(name string) string {
40
        items := strings.Split(name, ".")
41
        for i := range items {
42
                items[i] = n.ReservedName(items[i])
43
        }
44
        return strings.Join(items, ".")
45
}
func Open
Back

In /Users/kun/gobatis/gobatis/driver/postgres/db.go:

15
func Open(dsn string) *Dialector {
16
        d := &Dialector{}
17
        d.db, d.err = sql.Open("pgx", dsn)
18
        return d
19
}
func Namer.ColumnName
Back

In /Users/kun/gobatis/gobatis/driver/postgres/db.go:

54
func (n Namer) ColumnName(name string) string {
55
        var re = regexp.MustCompile(`([^A-Z_])([A-Z])`)
56
        snakeStr := re.ReplaceAllString(name, "${1}_${2}")
57
        return strings.ToLower(snakeStr)
58
}
func Dialector.Namer
Back

In /Users/kun/gobatis/gobatis/driver/postgres/db.go:

26
func (d Dialector) Namer() dialector.Namer {
27
        return &Namer{}
28
}
func Dialector.DB
Back

In /Users/kun/gobatis/gobatis/driver/postgres/db.go:

30
func (d Dialector) DB() (*sql.DB, error) {
31
        return d.db, d.err
32
}
func Namer.ReservedName
Back

In /Users/kun/gobatis/gobatis/driver/postgres/db.go:

47
func (n Namer) ReservedName(name string) string {
48
        if strings.HasPrefix(name, "\"") {
49
                return name
50
        }
51
        return fmt.Sprintf("\"%s\"", name)
52
}
Package Overview: github.com/gobatis/gobatis/dtd 0.0%

Please select a function to see what's left for testing.

MapperElement(...) github.com/gobatis/gobatis/dtd/match.go 0.0% 0/33
ConfigElement(...) github.com/gobatis/gobatis/dtd/match.go 0.0% 0/25
Element.HasNode(...) github.com/gobatis/gobatis/dtd/element.go 0.0% 0/4
Element.HasAttribute(...) github.com/gobatis/gobatis/dtd/element.go 0.0% 0/4
Element.AddNode(...) github.com/gobatis/gobatis/dtd/element.go 0.0% 0/3
Element.AddAttribute(...) github.com/gobatis/gobatis/dtd/element.go 0.0% 0/3
Element.GetNodeCount(...) github.com/gobatis/gobatis/dtd/element.go 0.0% 0/3
NewElement(...) github.com/gobatis/gobatis/dtd/element.go 0.0% 0/1
func MapperElement
Back

In /Users/kun/gobatis/gobatis/dtd/match.go:

57
func MapperElement(name string) (elem *Element, err error) {
58
        switch name {
59
        case MAPPER:
60
                elem = Mapper
61
        case CACHE_REF:
62
                elem = CacheRef
63
        case CACHE:
64
                elem = Cache
65
        case RESULT_MAP:
66
                elem = ResultMap
67
        case CONSTRUCTOR:
68
                elem = Constructor
69
        case ID:
70
                elem = Id
71
        case RESULT:
72
                elem = Result
73
        case ID_ARG:
74
                elem = IdArg
75
        case ARG:
76
                elem = Arg
77
        case COLLECTION:
78
                elem = Collection
79
        case ASSOCIATION:
80
                elem = Association
81
        case DISCRIMINATOR:
82
                elem = Discriminator
83
        case CASE:
84
                elem = Case
85
        case TYPE_ALIAS:
86
                elem = TypeAlias
87
        case SELECT:
88
                elem = Select
89
        case INSERT:
90
                elem = Insert
91
        case SELECT_KEY:
92
                elem = SelectKey
93
        case UPDATE:
94
                elem = Update
95
        case DELETE:
96
                elem = Delete
97
        case INCLUDE:
98
                elem = Include
99
        case BIND:
100
                elem = Bind
101
        case SQL:
102
                elem = Sql
103
        case TRIM:
104
                elem = Trim
105
        case WHERE:
106
                elem = Where
107
        case SET:
108
                elem = Set
109
        case FOREACH:
110
                elem = Foreach
111
        case CHOOSE:
112
                elem = Choose
113
        case WHEN:
114
                elem = When
115
        case OTHERWISE:
116
                elem = Otherwise
117
        case IF:
118
                elem = If
119
        default:
120
                err = fmt.Errorf("not match %s dtd element", name)
121
        }
122
123
        return
124
}
func ConfigElement
Back

In /Users/kun/gobatis/gobatis/dtd/match.go:

5
func ConfigElement(name string) (elem *Element, err error) {
6
        switch name {
7
        case MODULE:
8
                elem = Module
9
        case DATABASE_ID_PROVIDER:
10
                elem = DatabaseIdProvider
11
        case PROPERTIES:
12
                elem = Properties
13
        case PROPERTY:
14
                elem = Property
15
        case SETTINGS:
16
                elem = Settings
17
        case SETTING:
18
                elem = Setting
19
        case TYPE_ALIASES:
20
                elem = TypeAliases
21
        case TYPE_ALIAS:
22
                elem = ConfigTypeAlias
23
        case TYPE_HANDLERS:
24
                elem = TypeHandlers
25
        case TYPE_HANDLER:
26
                elem = TypeHandle
27
        case OBJECT_FACTORY:
28
                elem = ObjectFactory
29
        case OBJECT_WRAPPER_FACTORY:
30
                elem = ObjectWrapperFactory
31
        case REFLECT_FACTORY:
32
                elem = ReflectFactory
33
        case PLUGINS:
34
                elem = Plugins
35
        case PLUGIN:
36
                elem = Plugin
37
        case ENVIRONMENTS:
38
                elem = Environments
39
        case ENVIRONMENT:
40
                elem = Environment
41
        case TRANSACTION_MANAGER:
42
                elem = TransactionManager
43
        case DATA_SOURCE:
44
                elem = DataSource
45
        case MAPPERS:
46
                elem = Mappers
47
        case MAPPER:
48
                elem = ConfigMapper
49
        case PACKAGE:
50
                elem = Package
51
        default:
52
                err = fmt.Errorf("not match %s dtd element", name)
53
        }
54
        return
55
}
func Element.HasNode
Back

In /Users/kun/gobatis/gobatis/dtd/element.go:

31
func (p Element) HasNode(name string) bool {
32
        if p.Nodes == nil {
33
                return false
34
        }
35
        _, ok := p.Nodes[name]
36
        return ok
37
}
func Element.HasAttribute
Back

In /Users/kun/gobatis/gobatis/dtd/element.go:

46
func (p Element) HasAttribute(name string) bool {
47
        if p.Attributes == nil {
48
                return false
49
        }
50
        _, ok := p.Attributes[name]
51
        return ok
52
}
func Element.AddNode
Back

In /Users/kun/gobatis/gobatis/dtd/element.go:

13
func (p *Element) AddNode(node string, times int) {
14
        if p.Nodes == nil {
15
                p.Nodes = map[string]int{}
16
        }
17
        
18
        p.Nodes[node] = times
19
        
20
}
func Element.AddAttribute
Back

In /Users/kun/gobatis/gobatis/dtd/element.go:

22
func (p *Element) AddAttribute(attribute string, check int) {
23
        if p.Attributes == nil {
24
                p.Attributes = map[string]int{}
25
        }
26
        
27
        p.Attributes[attribute] = check
28
        
29
}
func Element.GetNodeCount
Back

In /Users/kun/gobatis/gobatis/dtd/element.go:

39
func (p Element) GetNodeCount(name string) int {
40
        if p.Nodes == nil {
41
                return 0
42
        }
43
        return p.Nodes[name]
44
}
func NewElement
Back

In /Users/kun/gobatis/gobatis/dtd/element.go:

3
func NewElement(name string) Element {
4
        return Element{Name: name}
5
}
Package Overview: github.com/gobatis/gobatis/executor 45.8%

Please select a function to see what's left for testing.

replaceIsolatedLessThanWithEntity(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 17/17
reflectStruct(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 13/13
walkXMLNodes(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 9/9
initExprParser(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 9/9
RowsVars(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 6/6
newExprParser(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 5/5
@347:8(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 5/5
newRowMap(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 4/4
isNil(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 4/4
RowsParams(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 4/4
InsertBatch.Query(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 4/4
builtin.is(...) github.com/gobatis/gobatis/executor/builtin.go 100.0% 4/4
xmlNode.AddNode(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 4/4
Extract(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 4/4
reflectRow(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 4/4
newParamParser(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 4/4
xmlNodeStack.Len(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 3/3
exprParams.set(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 3/3
RowColumns(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 3/3
fragment.parseParams(...) github.com/gobatis/gobatis/executor/fragment.go 100.0% 3/3
exprParser.addVar(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 3/3
toSnakeCase(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 3/3
fragment.parseBlocks(...) github.com/gobatis/gobatis/executor/fragment.go 100.0% 3/3
xmlParser.enterElement(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 3/3
xmlNodeStack.Push(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 3/3
Default.scan(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 3/3
newXMLStack(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 3/3
RowParams(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 3/3
RowVars(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 3/3
newExprParams(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 3/3
init(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 3/3
ParallelQuery.Execute(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 2/2
@253:8(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 2/2
coverage.add(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 2/2
newValueStack(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 2/2
@113:8(...) github.com/gobatis/gobatis/executor/fragment.go 100.0% 2/2
newParamsStack(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 2/2
xmlParser.ExitEveryRule(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 2/2
parserErrorStrategy.RecoverInline(...) github.com/gobatis/gobatis/executor/error.go 100.0% 2/2
parserErrorStrategy.Recover(...) github.com/gobatis/gobatis/executor/error.go 100.0% 2/2
_error.format(...) github.com/gobatis/gobatis/executor/error.go 100.0% 2/2
@1209:8(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 2/2
newErrorListener(...) github.com/gobatis/gobatis/executor/error.go 100.0% 1/1
newXMLNode(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
TrimColumns(...) github.com/gobatis/gobatis/executor/utils.go 100.0% 1/1
coverage.setTotal(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
init(...) github.com/gobatis/gobatis/executor/builtin.go 100.0% 1/1
valueStack.push(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
valueStack.len(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
NewDB(...) github.com/gobatis/gobatis/executor/db.go 100.0% 1/1
DB.TraceId(...) github.com/gobatis/gobatis/executor/db.go 100.0% 1/1
DB.IsTx(...) github.com/gobatis/gobatis/executor/db.go 100.0% 1/1
throw(...) github.com/gobatis/gobatis/executor/error.go 100.0% 1/1
exprParser.EnterOperand(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
coverage.len(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
exprParser.EnterExpressions(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
coverage.covered(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
exprParser.builtParams(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
NewFetchQuery(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 1/1
newParserErrorStrategy(...) github.com/gobatis/gobatis/executor/error.go 100.0% 1/1
scanner.RowsAffected(...) github.com/gobatis/gobatis/executor/scanner.go 100.0% 1/1
scanner.LastInsertId(...) github.com/gobatis/gobatis/executor/scanner.go 100.0% 1/1
@284:54(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 1/1
logger.Debugf(...) github.com/gobatis/gobatis/executor/logger.go 100.0% 1/1
Tx.IsTx(...) github.com/gobatis/gobatis/executor/tx.go 100.0% 1/1
newCoverage(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
paramsStack.push(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 1/1
Tx.TraceId(...) github.com/gobatis/gobatis/executor/tx.go 100.0% 1/1
DefaultLogger(...) github.com/gobatis/gobatis/executor/logger.go 100.0% 1/1
insertBatchScanner.RowsAffected(...) github.com/gobatis/gobatis/executor/scanner.go 100.0% 1/1
NewDefault(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 1/1
Default.Query(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 1/1
@208:62(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 1/1
NewTx(...) github.com/gobatis/gobatis/executor/tx.go 100.0% 1/1
insertBatchScanner.LastInsertId(...) github.com/gobatis/gobatis/executor/scanner.go 100.0% 1/1
NewInsertBatch(...) github.com/gobatis/gobatis/executor/executor.go 100.0% 1/1
paramParser.EnterParamDecl(...) github.com/gobatis/gobatis/executor/parser.go 92.9% 13/14
logger.Trace(...) github.com/gobatis/gobatis/executor/logger.go 90.5% 19/21
fragment.parseSql(...) github.com/gobatis/gobatis/executor/fragment.go 90.0% 27/30
ReflectRows(...) github.com/gobatis/gobatis/executor/utils.go 88.9% 16/18
setValue(...) github.com/gobatis/gobatis/executor/utils.go 88.9% 16/18
getText(...) github.com/gobatis/gobatis/executor/error.go 88.9% 8/9
InsertBatch.execute(...) github.com/gobatis/gobatis/executor/executor.go 87.5% 14/16
exprParser.realVars(...) github.com/gobatis/gobatis/executor/parser.go 87.5% 7/8
isStructSlice(...) github.com/gobatis/gobatis/executor/utils.go 87.5% 7/8
@71:8(...) github.com/gobatis/gobatis/executor/executor.go 87.5% 7/8
FetchQuery.Execute(...) github.com/gobatis/gobatis/executor/executor.go 87.0% 20/23
SplitStructSlice(...) github.com/gobatis/gobatis/executor/utils.go 85.7% 12/14
xmlNodeStack.Pop(...) github.com/gobatis/gobatis/executor/parser.go 85.7% 6/7
xmlNodeStack.Peak(...) github.com/gobatis/gobatis/executor/parser.go 83.3% 5/6
paramParser.addParam(...) github.com/gobatis/gobatis/executor/parser.go 83.3% 5/6
affectConstraint.Check(...) github.com/gobatis/gobatis/executor/constraint.go 83.3% 5/6
Default.Execute(...) github.com/gobatis/gobatis/executor/executor.go 82.9% 34/41
InsertBatch.Execute(...) github.com/gobatis/gobatis/executor/executor.go 82.8% 24/29
scanner.Scan(...) github.com/gobatis/gobatis/executor/scanner.go 82.4% 28/34
exprParser.parseExpression(...) github.com/gobatis/gobatis/executor/parser.go 82.4% 14/17
fragment.parseStatement(...) github.com/gobatis/gobatis/executor/fragment.go 82.4% 14/17
setStruct(...) github.com/gobatis/gobatis/executor/utils.go 81.8% 9/11
_error.Error(...) github.com/gobatis/gobatis/executor/error.go 80.0% 12/15
insertBatchScanner.Scan(...) github.com/gobatis/gobatis/executor/scanner.go 80.0% 8/10
@377:54(...) github.com/gobatis/gobatis/executor/executor.go 80.0% 4/5
paramsStack.getVar(...) github.com/gobatis/gobatis/executor/parser.go 80.0% 4/5
setBool(...) github.com/gobatis/gobatis/executor/utils.go 80.0% 4/5
setString(...) github.com/gobatis/gobatis/executor/utils.go 80.0% 4/5
CallFuncPos(...) github.com/gobatis/gobatis/executor/logger.go 77.8% 7/9
exprParser.ExitVar_(...) github.com/gobatis/gobatis/executor/parser.go 75.0% 9/12
newAffectConstraint(...) github.com/gobatis/gobatis/executor/constraint.go 75.0% 9/12
handleSlice(...) github.com/gobatis/gobatis/executor/parser.go 75.0% 3/4
prepareFieldName(...) github.com/gobatis/gobatis/executor/utils.go 75.0% 3/4
ExtractTag(...) github.com/gobatis/gobatis/executor/utils.go 75.0% 3/4
exprParams.bind(...) github.com/gobatis/gobatis/executor/parser.go 73.3% 11/15
parseSQL(...) github.com/gobatis/gobatis/executor/parser.go 72.7% 8/11
xmlParser.exitElement(...) github.com/gobatis/gobatis/executor/parser.go 71.4% 5/7
exprParser.popBinaryOperands(...) github.com/gobatis/gobatis/executor/parser.go 71.4% 5/7
exprParams.get(...) github.com/gobatis/gobatis/executor/parser.go 70.0% 7/10
xmlParser.EnterEveryRule(...) github.com/gobatis/gobatis/executor/parser.go 70.0% 7/10
indirect(...) github.com/gobatis/gobatis/executor/utils.go 69.2% 18/26
valueStack.pop(...) github.com/gobatis/gobatis/executor/parser.go 66.7% 6/9
literalEqual(...) github.com/gobatis/gobatis/executor/utils.go 66.7% 2/3
xmlParser.enterChardata(...) github.com/gobatis/gobatis/executor/parser.go 66.7% 2/3
paramParser.walkMethods(...) github.com/gobatis/gobatis/executor/parser.go 66.7% 2/3
trimComma(...) github.com/gobatis/gobatis/executor/utils.go 66.7% 2/3
xmlParser.enterReference(...) github.com/gobatis/gobatis/executor/parser.go 63.6% 7/11
setArray(...) github.com/gobatis/gobatis/executor/utils.go 53.8% 14/26
exprParser.numericStringCalc(...) github.com/gobatis/gobatis/executor/parser.go 52.9% 9/17
@309:8(...) github.com/gobatis/gobatis/executor/executor.go 40.0% 2/5
AddError(...) github.com/gobatis/gobatis/executor/utils.go 40.0% 2/5
@172:8(...) github.com/gobatis/gobatis/executor/executor.go 40.0% 2/5
setNumber(...) github.com/gobatis/gobatis/executor/utils.go 38.9% 14/36
exprParser.ExitExpression(...) github.com/gobatis/gobatis/executor/parser.go 36.7% 11/30
castRecoverError(...) github.com/gobatis/gobatis/executor/error.go 25.0% 2/8
fragment.parseBlock(...) github.com/gobatis/gobatis/executor/fragment.go 16.7% 2/12
fragment.parseForeach(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/42
exprValue.call(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/25
varToReflectKind(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/24
exprParser.ExitIndex(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/23
xmlParser.validateNode(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/21
fragment.parseChoose(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/20
param.expected(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/20
TestSetValueBasic(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/20
exprParser.ExitCall(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/17
exprParser.ExitSlice_(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/17
fragment.call(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/16
exprParser.relationCalc(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/13
exprValue.visitMember(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/12
exprParser.unaryCalc(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/11
xmlParser.checkResultConflict(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/11
exprValue.visitArray(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/10
fragment.parseTest(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/10
exprValue.visitMap(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/10
fragment.trimPrefixOverrides(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/10
exprParser.popTertiaryOperands(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/10
exprParser.ExitMember(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/10
paramsStack.pop(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/9
printVars(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/9
exprValue.visitSlice(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/8
exprParser.logicCalc(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/8
fragment.bindForeachParams(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/7
fragment.checkParameter(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/7
TestIndirect(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/7
fragment.parseForeachChild(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/6
caller.execer(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/6
exprParser.tertiaryCalc(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/6
caller.queryer(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/6
xmlNode.GetAttribute(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/6
reflectTypeElem(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/5
xmlParser.enterAttribute(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/5
toReflectValueElem(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/5
exprParser.ExitInteger(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/5
exprParser.ExitFloat_(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/5
InvalidUnmarshalError.Error(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/5
reflectValueElem(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/5
fragment.trimPrefixOverride(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/5
valueStack.peak(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/4
xmlNode.HasAttribute(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/4
@733:8(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/4
_uint8(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
_uint(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
caller.context(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/4
fragment.fork(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/4
_uint32(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
psr.merge(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/4
_uint64(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
_int64(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
_uint16(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
_int32(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
_int16(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
coverage.notCovered(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/4
_string(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
_int8(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
paramsStack.peak(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/4
_bool(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
_int(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
builtin.get(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
trimValueQuote(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/4
_decimal(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/4
isDB(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/3
param.Type(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/3
parseFragment(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/3
isContext(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/3
xmlNode.AddAttribute(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/3
xmlNode.countNode(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/3
xmlNodeStack.Empty(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/3
isTx(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/3
exprValue.convertible(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/3
@92:8(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/2
_error.with(...) github.com/gobatis/gobatis/executor/error.go 0.0% 0/2
exprParser.ExitString_(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/2
_error.setParent(...) github.com/gobatis/gobatis/executor/error.go 0.0% 0/2
exprParser.ExitNil_(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/2
_strings.TrimSpace(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
@52:43(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/1
_strings.TrimSuffix(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
exprParser.throw(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/1
_strings.TrimPrefix(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
exprParser.ExitMisc(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/1
_strings.ReplaceAll(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
logger.Warnf(...) github.com/gobatis/gobatis/executor/logger.go 0.0% 0/1
_len(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
ParallelQuery.Query(...) github.com/gobatis/gobatis/executor/executor.go 0.0% 0/1
FetchQuery.Query(...) github.com/gobatis/gobatis/executor/executor.go 0.0% 0/1
_strings.TrimRight(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.TrimLeft(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Trim(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Title(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.ToTitle(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.ToLower(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.ToUpper(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Repeat(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
Tx.BeginTx(...) github.com/gobatis/gobatis/executor/tx.go 0.0% 0/1
_strings.HasSuffix(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
Tx.Close(...) github.com/gobatis/gobatis/executor/tx.go 0.0% 0/1
_strings.HasPrefix(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
errorListener.SyntaxError(...) github.com/gobatis/gobatis/executor/error.go 0.0% 0/1
paramsStack.len(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/1
paramsStack.empty(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/1
isError(...) github.com/gobatis/gobatis/executor/utils.go 0.0% 0/1
_strings.Join(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Fields(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
valueStack.empty(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/1
fragment.proxy(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/1
_strings.Replace(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.SplitAfter(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Split(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.SplitAfterN(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.SplitN(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.LastIndexAny(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.IndexAny(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.LastIndex(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.ContainsRune(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
exprValue.int(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/1
_strings.ContainsAny(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Contains(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Count(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
logger.Errorf(...) github.com/gobatis/gobatis/executor/logger.go 0.0% 0/1
exprValue.accept(...) github.com/gobatis/gobatis/executor/parser.go 0.0% 0/1
logger.Infof(...) github.com/gobatis/gobatis/executor/logger.go 0.0% 0/1
fragment.parseWhere(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/1
fragment.parseTrim(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/1
fragment.parseSet(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/1
logger.brand(...) github.com/gobatis/gobatis/executor/logger.go 0.0% 0/1
caller.removeParam(...) github.com/gobatis/gobatis/executor/fragment.go 0.0% 0/1
_strings.EqualFold(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
_strings.Index(...) github.com/gobatis/gobatis/executor/builtin.go 0.0% 0/1
parserErrorStrategy.Sync(...) github.com/gobatis/gobatis/executor/error.go 100.0% 0/0
parserErrorStrategy.ReportError(...) github.com/gobatis/gobatis/executor/error.go 100.0% 0/0
parserErrorStrategy.ReportMatch(...) github.com/gobatis/gobatis/executor/error.go 100.0% 0/0
errorListener.ReportContextSensitivity(...) github.com/gobatis/gobatis/executor/error.go 100.0% 0/0
errorListener.ReportAttemptingFullContext(...) github.com/gobatis/gobatis/executor/error.go 100.0% 0/0
@20:8(...) github.com/gobatis/gobatis/executor/parser.go 100.0% 0/0
errorListener.ReportAmbiguity(...) github.com/gobatis/gobatis/executor/error.go 100.0% 0/0
func replaceIsolatedLessThanWithEntity
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

138
func replaceIsolatedLessThanWithEntity(s string) string {
139
        // 将字符串转换为 rune 切片,以支持多字节字符
140
        runes := []rune(s)
141
        lastLeftBracket := -1
142
        pos := map[int]struct{}{}
143
        for i, r := range runes {
144
                switch r {
145
                case '<':
146
                        // 如果之前已经有标记的 '<',替换它
147
                        if lastLeftBracket != -1 {
148
                                pos[lastLeftBracket] = struct{}{}
149
                        }
150
                        lastLeftBracket = i
151
                case '>':
152
                        // 清除之前标记的 '<'
153
                        lastLeftBracket = -1
154
                }
155
        }
156
        
157
        // 检查是否在字符串的结尾有一个标记的 '<'
158
        if lastLeftBracket != -1 {
159
                pos[lastLeftBracket] = struct{}{}
160
        }
161
        
162
        var r []rune
163
        for i := range runes {
164
                if _, ok := pos[i]; ok {
165
                        r = append(r, []rune(lt)...)
166
                } else {
167
                        r = append(r, runes[i])
168
                }
169
        }
170
        
171
        return string(r)
172
}
func reflectStruct
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

623
func reflectStruct(rt reflect.Type, rv reflect.Value, namer dialector.Namer, tag string) Row {
624
        
625
        if rv.Kind() == reflect.Ptr {
626
                rv = rv.Elem()
627
        }
628
        
629
        var r Row
630
        for i := 0; i < rt.NumField(); i++ {
631
                f := rt.Field(i)
632
                var n string
633
                if t := f.Tag.Get(tag); t != "" {
634
                        n = ExtractTag(t)
635
                } else {
636
                        n = namer.ColumnName(f.Name)
637
                }
638
                v := rv.Field(i)
639
                if !isNil(v) {
640
                        r = append(r, &Column{
641
                                column: n,
642
                                value:  v.Interface(),
643
                        })
644
                }
645
        }
646
        
647
        return r
648
}
func walkXMLNodes
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

66
func walkXMLNodes(listener antlr.ParseTreeListener, tokens string) {
67
        lexer := xml.NewXMLLexer(antlr.NewInputStream(strings.TrimSpace(tokens)))
68
        lexer.RemoveErrorListeners()
69
        lexer.AddErrorListener(newErrorListener())
70
        stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel)
71
        parser := xml.NewXMLParser(stream)
72
        parser.BuildParseTrees = true
73
        parser.AddErrorListener(antlr.NewDiagnosticErrorListener(false))
74
        parser.SetErrorHandler(newParserErrorStrategy())
75
        antlr.ParseTreeWalkerDefault.Walk(listener, parser.Document())
76
}
func initExprParser
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

78
func initExprParser(tokens string) (parser *expr.ExprParser) {
79
        lexer := expr.NewExprLexer(antlr.NewInputStream(tokens))
80
        lexer.RemoveErrorListeners()
81
        lexer.AddErrorListener(newErrorListener())
82
        stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel)
83
        parser = expr.NewExprParser(stream)
84
        parser.BuildParseTrees = true
85
        parser.AddErrorListener(antlr.NewDiagnosticErrorListener(false))
86
        parser.SetErrorHandler(newParserErrorStrategy())
87
        return
88
}
func RowsVars
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

684
func RowsVars(rows []Row) (vars []string) {
685
        for i, v := range rows {
686
                var s []string
687
                for _, vv := range v {
688
                        s = append(s, fmt.Sprintf("#{%s%d}", vv.column, i))
689
                }
690
                vars = append(vars, fmt.Sprintf("(%s)", strings.Join(s, ",")))
691
        }
692
        return
693
}
func newExprParser
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

955
func newExprParser(params ...reflect.Value) *exprParser {
956
        r := new(exprParser)
957
        r.paramsStack = newParamsStack()
958
        r.paramsStack.push(r.builtParams())
959
        r.paramsStack.push(newExprParams(params...))
960
        return r
961
}
func @347:8
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

347
func() {
348
                d = NewDefault(conn, &Raw{
349
                        Ctx:    f.ctx,
350
                        Query:  false,
351
                        SQL:    fmt.Sprintf("close %s", cursor),
352
                        Params: nil,
353
                })
354
                err = AddError(err, d.Execute(logger, pos, trace, debug, affect, nil))
355
                
356
                now := time.Now()
357
                err = AddError(err, tx.Commit())
358
                
359
                logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
360
                        Trace:        trace,
361
                        Debug:        debug,
362
                        BeginAt:      now,
363
                        RawSQL:       "commit",
364
                        PlainSQL:     "commit",
365
                        RowsAffected: 0,
366
                })
367
        }
func newRowMap
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

229
func newRowMap(columns []string, values []interface{}) rowMap {
230
        m := rowMap{}
231
        for i, v := range columns {
232
                m[v] = values[i]
233
        }
234
        return m
235
}
func isNil
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

650
func isNil(v reflect.Value) bool {
651
        switch v.Kind() {
652
        case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice, reflect.UnsafePointer:
653
                if v.IsNil() {
654
                        return true
655
                }
656
        }
657
        return false
658
}
func RowsParams
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

695
func RowsParams(rows []Row) (params []Param) {
696
        for i, v := range rows {
697
                for _, vv := range v {
698
                        params = append(params, Param{
699
                                Name:  fmt.Sprintf("%s%d", vv.column, i),
700
                                Value: vv.value,
701
                        })
702
                }
703
                
704
        }
705
        return
706
}
func InsertBatch.Query
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

158
func (i *InsertBatch) Query() bool {
159
        for _, v := range i.raws {
160
                if v.Query {
161
                        return v.Query
162
                }
163
        }
164
        return false
165
}
func builtin.is
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

49
func (p *builtin) is(name string) bool {
50
        p.mu.RLock()
51
        defer p.mu.RUnlock()
52
        _, ok := p._map[name]
53
        return ok
54
}
func xmlNode.AddNode
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

277
func (p *xmlNode) AddNode(node *xmlNode) {
278
        if p.nodesCount == nil {
279
                p.nodesCount = map[string]int{}
280
        }
281
        p.nodesCount[node.Name]++
282
        p.Nodes = append(p.Nodes, node)
283
}
func Extract
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

180
func Extract[T any, V any](items []T, fn func(item T) V) []V {
181
        var r []V
182
        for _, v := range items {
183
                r = append(r, fn(v))
184
        }
185
        return r
186
}
func reflectRow
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

197
func reflectRow(columns []string, row []interface{}, pv reflect.Value, first bool) (bool, error) {
198
        
199
        switch pv.Kind() {
200
        case reflect.Slice, reflect.Array:
201
                return false, setArray(pv, newRowMap(columns, row))
202
        case reflect.Struct:
203
                return true, setStruct(pv, newRowMap(columns, row))
204
        }
205
        return true, setValue(pv, row[0])
206
}
func newParamParser
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

585
func newParamParser(file string) *paramParser {
586
        r := new(paramParser)
587
        r.coverage = newCoverage()
588
        r.file = file
589
        return r
590
}
func xmlNodeStack.Len
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

330
func (p *xmlNodeStack) Len() int {
331
        p.lock.RLock()
332
        defer p.lock.RUnlock()
333
        return p.list.Len()
334
}
func exprParams.set
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

857
func (p *exprParams) set(params ...reflect.Value) {
858
        p.values = make([]exprValue, 0)
859
        for _, v := range params {
860
                p.values = append(p.values, exprValue{
861
                        value: v.Interface(),
862
                })
863
        }
864
}
func RowColumns
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

660
func RowColumns(row Row, namer dialector.Namer) (columns []string) {
661
        for _, v := range row {
662
                columns = append(columns, namer.ReservedName(v.column))
663
        }
664
        return
665
}
func fragment.parseParams
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

384
func (p *fragment) parseParams(tokens string) []*param {
385
        parser := newParamParser(p.node.File)
386
        parser.walkMethods(initExprParser(tokens))
387
        return parser.params
388
}
func exprParser.addVar
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1242
func (p *exprParser) addVar(_expr string, _var interface{}) {
1243
        _var = cast.Indirect(_var)
1244
        p.vars = append(p.vars, _var)
1245
        p.exprs = append(p.exprs, _expr)
1246
}
func toSnakeCase
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

223
func toSnakeCase(s string) string {
224
        var re = regexp.MustCompile(`([^A-Z_])([A-Z])`)
225
        snakeStr := re.ReplaceAllString(s, "${1}_${2}")
226
        return strings.ToLower(snakeStr)
227
}
func fragment.parseBlocks
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

195
func (p *fragment) parseBlocks(parser *exprParser, node *xmlNode, res *psr) {
196
        for _, child := range node.Nodes {
197
                p.parseBlock(parser, child, res)
198
        }
199
        return
200
}
func xmlParser.enterElement
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

426
func (p *xmlParser) enterElement(c *xml.ElementContext) {
427
        name := c.Name(0)
428
        //if p.depth == 0 {
429
        //        if name.GetText() != p.rootElement.Name {
430
        //                throw(p.file, c, parseMapperErr).format("top level element %s unsupported", name.GetText())
431
        //        }
432
        //}
433
        p.stack.Push(newXMLNode(p.file, name.GetText(), c, name.GetSymbol()))
434
        p.depth++
435
}
func xmlNodeStack.Push
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

303
func (p *xmlNodeStack) Push(value *xmlNode) {
304
        p.lock.Lock()
305
        defer p.lock.Unlock()
306
        p.list.PushBack(value)
307
}
func Default.scan
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

141
func (d *Default) scan(s *scanner, f func(Scanner) error) error {
142
        if f == nil {
143
                return nil
144
        }
145
        return f(s)
146
}
func newXMLStack
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

297
func newXMLStack() *xmlNodeStack {
298
        l := list.New()
299
        lock := &sync.RWMutex{}
300
        return &xmlNodeStack{l, lock}
301
}
func RowParams
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

674
func RowParams(row Row) (params []Param) {
675
        for _, v := range row {
676
                params = append(params, Param{
677
                        Name:  v.column,
678
                        Value: v.value,
679
                })
680
        }
681
        return
682
}
func RowVars
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

667
func RowVars(row Row) (vars []string) {
668
        for _, v := range row {
669
                vars = append(vars, fmt.Sprintf("#{%s}", v.column))
670
        }
671
        return
672
}
func newExprParams
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

830
func newExprParams(params ...reflect.Value) *exprParams {
831
        r := &exprParams{}
832
        r.set(params...)
833
        return r
834
}
func init
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

27
func init() {
28
        errorType = reflect.TypeOf((*error)(nil)).Elem()
29
        scannerType = reflect.TypeOf((*sql.Scanner)(nil)).Elem()
30
        valuerType = reflect.TypeOf((*Valuer)(nil)).Elem()
31
}
func ParallelQuery.Execute
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

282
func (p *ParallelQuery) Execute(logger Logger, pos string, trace, debug bool, affect any, _ func(Scanner) error) error {
283
        d := NewDefault(p.Conn, p.Raw)
284
        return d.Execute(logger, pos, trace, debug, affect, func(s Scanner) error {
285
                return s.Scan(p.Dest)
286
        })
287
}
func @253:8
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

253
func() {
254
                if d.rows != nil {
255
                        err = AddError(err, d.rows.Close())
256
                }
257
        }
func coverage.add
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

200
func (p *coverage) add(ctx antlr.ParserRuleContext) {
201
        for i := ctx.GetStart().GetTokenIndex(); i <= ctx.GetStop().GetTokenIndex(); i++ {
202
                p.scan[i] = true
203
        }
204
}
func newValueStack
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

791
func newValueStack() *valueStack {
792
        l := list.New()
793
        return &valueStack{l}
794
}
func @113:8
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

113
func() {
114
                e := recover()
115
                err = castRecoverError(p.node.File, e)
116
        }
func newParamsStack
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

906
func newParamsStack() *paramsStack {
907
        l := list.New()
908
        return &paramsStack{l}
909
}
func xmlParser.ExitEveryRule
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

517
func (p *xmlParser) ExitEveryRule(ctx antlr.ParserRuleContext) {
518
        switch ctx.GetRuleIndex() {
519
        case xml.XMLParserRULE_element:
520
                p.exitElement(nil)
521
        }
522
}
func parserErrorStrategy.RecoverInline
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

153
func (p *parserErrorStrategy) RecoverInline(recognizer antlr.Parser) antlr.Token {
154
        p.Recover(recognizer, antlr.NewInputMisMatchException(recognizer))
155
        return nil
156
}
func parserErrorStrategy.Recover
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

147
func (p *parserErrorStrategy) Recover(recognizer antlr.Parser, e antlr.RecognitionException) {
148
        // TODO handle syntax error detail
149
        context := recognizer.GetParserRuleContext()
150
        throw("", context, syntaxErr).format("syntax error")
151
}
func _error.format
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

71
func (p *_error) format(format string, args ...interface{}) {
72
        p.message = fmt.Sprintf(format, args...)
73
        panic(p)
74
}
func @1209:8
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1209
func() {
1210
                e := recover()
1211
                err = castRecoverError(p.file, e)
1212
        }
func newErrorListener
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

170
func newErrorListener() *errorListener {
171
        return new(errorListener)
172
}
func newXMLNode
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

223
func newXMLNode(file, name string, ctx antlr.ParserRuleContext, token antlr.Token) *xmlNode {
224
        return &xmlNode{
225
                File:  file,
226
                Name:  name,
227
                ctx:   ctx,
228
                start: token,
229
        }
230
}
func TrimColumns
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

611
func TrimColumns(s string) string {
612
        return strings.TrimSuffix(s, ",")
613
}
func coverage.setTotal
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

196
func (p *coverage) setTotal(total int) {
197
        p.total = total
198
}
func init
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

14
func init() {
15
        _builtin = &builtin{
16
                mu: sync.RWMutex{},
17
                _map: map[string]interface{}{
18
                        "len":     _len,
19
                        "int":     _int,
20
                        "int8":    _int8,
21
                        "int16":   _int16,
22
                        "int32":   _int32,
23
                        "int64":   _int64,
24
                        "uint":    _uint,
25
                        "uint8":   _uint8,
26
                        "uint16":  _uint16,
27
                        "uint32":  _uint32,
28
                        "uint64":  _uint64,
29
                        "decimal": _decimal,
30
                        "bool":    _bool,
31
                        "string":  _string,
32
                        "strings": _strings{},
33
                },
34
        }
35
}
func valueStack.push
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

796
func (p *valueStack) push(value *exprValue) {
797
        p.list.PushBack(value)
798
}
func valueStack.len
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

822
func (p *valueStack) len() int {
823
        return p.list.Len()
824
}
func NewDB
Back

In /Users/kun/gobatis/gobatis/executor/db.go:

7
func NewDB(db *sql.Conn, traceId string) *DB {
8
        return &DB{Conn: db, traceId: traceId}
9
}
func DB.TraceId
Back

In /Users/kun/gobatis/gobatis/executor/db.go:

18
func (d *DB) TraceId() string {
19
        return d.traceId
20
}
func DB.IsTx
Back

In /Users/kun/gobatis/gobatis/executor/db.go:

22
func (d *DB) IsTx() bool {
23
        return false
24
}
func throw
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

54
func throw(file string, ctx antlr.ParserRuleContext, code int) *_error {
55
        return &_error{file: file, ctx: ctx, code: code}
56
}
func exprParser.EnterOperand
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1002
func (p *exprParser) EnterOperand(ctx *expr.OperandContext) {
1003
        p.coverage.add(ctx)
1004
}
func coverage.len
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

206
func (p *coverage) len() int {
207
        return len(p.scan)
208
}
func exprParser.EnterExpressions
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

994
func (p *exprParser) EnterExpressions(ctx *expr.ExpressionsContext) {
995
        p.coverage.setTotal(ctx.GetStop().GetTokenIndex() + 1)
996
}
func coverage.covered
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

210
func (p *coverage) covered() bool {
211
        return p.total == p.len()
212
}
func exprParser.builtParams
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

990
func (p *exprParser) builtParams() *exprParams {
991
        return newExprParams()
992
}
func NewFetchQuery
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

289
func NewFetchQuery(ctx context.Context, conn Conn, raw *Raw, limit uint) *FetchQuery {
290
        return &FetchQuery{ctx: ctx, conn: conn, raw: raw, limit: limit}
291
}
func newParserErrorStrategy
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

139
func newParserErrorStrategy() *parserErrorStrategy {
140
        return &parserErrorStrategy{BailErrorStrategy: antlr.NewBailErrorStrategy()}
141
}
func scanner.RowsAffected
Back

In /Users/kun/gobatis/gobatis/executor/scanner.go:

24
func (s *scanner) RowsAffected() int64 {
25
        return s.rowsAffected
26
}
func scanner.LastInsertId
Back

In /Users/kun/gobatis/gobatis/executor/scanner.go:

28
func (s *scanner) LastInsertId() int64 {
29
        return s.lastInsertId
30
}
func @284:54
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

284
func(s Scanner) error {
285
                return s.Scan(p.Dest)
286
        }
func logger.Debugf
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

71
func (l logger) Debugf(format string, a ...any) {
72
        syslog.Printf(format, a...)
73
}
func Tx.IsTx
Back

In /Users/kun/gobatis/gobatis/executor/tx.go:

27
func (t *Tx) IsTx() bool {
28
        return true
29
}
func newCoverage
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

185
func newCoverage() *coverage {
186
        return &coverage{
187
                scan: map[int]bool{},
188
        }
189
}
func paramsStack.push
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

911
func (p *paramsStack) push(value *exprParams) {
912
        p.list.PushBack(value)
913
}
func Tx.TraceId
Back

In /Users/kun/gobatis/gobatis/executor/tx.go:

19
func (t *Tx) TraceId() string {
20
        return t.traceId
21
}
func DefaultLogger
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

21
func DefaultLogger() Logger {
22
        return &logger{}
23
}
func insertBatchScanner.RowsAffected
Back

In /Users/kun/gobatis/gobatis/executor/scanner.go:

105
func (i *insertBatchScanner) RowsAffected() int64 {
106
        return i.rowsAffected
107
}
func NewDefault
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

23
func NewDefault(conn Conn, raw *Raw) *Default {
24
        return &Default{conn: conn, raw: raw, clean: true}
25
}
func Default.Query
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

40
func (d *Default) Query() bool {
41
        return d.raw.Query
42
}
func @208:62
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

208
func(s Scanner) error {
209
                        return scan(s)
210
                }
func NewTx
Back

In /Users/kun/gobatis/gobatis/executor/tx.go:

8
func NewTx(tx *sql.Tx, traceID string) *Tx {
9
        return &Tx{Tx: tx, traceId: traceID}
10
}
func insertBatchScanner.LastInsertId
Back

In /Users/kun/gobatis/gobatis/executor/scanner.go:

109
func (i *insertBatchScanner) LastInsertId() int64 {
110
        return i.lastInsertId
111
}
func NewInsertBatch
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

148
func NewInsertBatch(ctx context.Context, conn Conn, raws []*Raw) *InsertBatch {
149
        return &InsertBatch{ctx: ctx, conn: conn, raws: raws}
150
}
func paramParser.EnterParamDecl
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

601
func (p *paramParser) EnterParamDecl(ctx *expr.ParamDeclContext) {
602
        var name string
603
        if ctx.IDENTIFIER() != nil {
604
                name = ctx.IDENTIFIER().GetText()
605
                if _builtin.is(name) {
606
                        throw(p.file, ctx, parameterConflictWithBuiltInErr).format("'%s' conflict with builtin", name)
607
                }
608
        }
609
        var _type string
610
        if ctx.ParamType() != nil {
611
                _type = ctx.ParamType().GetText()
612
        }
613
        slice := false
614
        if _type == "" {
615
                _type = reflect.Interface.String()
616
        } else {
617
                _type, slice = handleSlice(_type)
618
        }
619
        p.addParam(ctx, name, _type, slice)
620
        p.index++
621
}
func logger.Trace
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

34
func (l logger) Trace(pos, traceId string, tx bool, err error, tr *SQLTrace) {
35
        if !tr.Trace && !tr.Debug && err == nil {
36
                return
37
        }
38
        info := &strings.Builder{}
39
        var f func(format string, a ...any)
40
        if err != nil {
41
                f = l.Errorf
42
        } else {
43
                f = l.Debugf
44
        }
45
        if traceId != "" {
46
                traceId = fmt.Sprintf("[%s]", color.CyanString(traceId))
47
        }
48
        var t string
49
        if tx {
50
                t = fmt.Sprintf("[%s]", color.MagentaString("tx"))
51
        }
52
        if pos == "" {
53
                pos = CallFuncPos(5)
54
        }
55
        info.WriteString(fmt.Sprintf("%s%s %s", traceId, t, color.RedString(pos)))
56
        if err != nil {
57
                info.WriteString(color.RedString(fmt.Sprintf(" ERROR: %s", err.Error())))
58
        }
59
        
60
        if tr != nil {
61
                cost := time.Since(tr.BeginAt)
62
                info.WriteString(fmt.Sprintf("\n%s %s %s",
63
                        color.YellowString(fmt.Sprintf("[%s]", cost)),
64
                        color.BlueString(fmt.Sprintf("[rows:%d]", tr.RowsAffected)),
65
                        tr.RawSQL,
66
                ))
67
        }
68
        f(info.String())
69
}
func fragment.parseSql
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

152
func (p *fragment) parseSql(parser *exprParser, node *xmlNode, res *psr) {
153
        chars := []rune(node.Text)
154
        begin := false
155
        inject := false
156
        var from int
157
        var next int
158
        var s string
159
        for i := 0; i < len(chars); i++ {
160
                if !begin {
161
                        next = i + 1
162
                        if (chars[i] == 35 || chars[i] == 36) && next <= len(chars)-1 && chars[next] == 123 {
163
                                if chars[i] == 36 {
164
                                        inject = true
165
                                }
166
                                begin = true
167
                                i++
168
                                from = i + 1
169
                                continue
170
                        } else {
171
                                s += string(chars[i])
172
                        }
173
                } else if chars[i] == 125 {
174
                        _expr := string(chars[from:i])
175
                        r, _, err := parser.parseExpression(node.ctx, _expr)
176
                        if err != nil {
177
                                panic(err)
178
                        }
179
                        if inject {
180
                                s += fmt.Sprintf("%v", cast.Indirect(r))
181
                        } else {
182
                                parser.varIndex++
183
                                s += fmt.Sprintf("$%d", parser.varIndex)
184
                                parser.addVar(_expr, r)
185
                        }
186
                        begin = false
187
                        inject = false
188
                }
189
        }
190
191
        // to avoid useless space
192
        res.sql += s
193
}
func ReflectRows
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

576
func ReflectRows(v any, namer dialector.Namer, tag string) (rows []Row, err error) {
577
        
578
        rv := reflect.ValueOf(v)
579
        if rv.Kind() == reflect.Ptr {
580
                rv = rv.Elem()
581
        }
582
        
583
        rt := rv.Type()
584
        multiple := false
585
        
586
        if rv.Kind() == reflect.Slice || rv.Kind() == reflect.Array {
587
                multiple = true
588
                rt = rv.Type().Elem()
589
        }
590
        
591
        if rt.Kind() == reflect.Ptr {
592
                rt = rt.Elem()
593
        }
594
        
595
        if rt.Kind() != reflect.Struct {
596
                err = fmt.Errorf("only accept struct, got: %s", rt.Kind())
597
                return
598
        }
599
        
600
        if multiple {
601
                for i := 0; i < rv.Len(); i++ {
602
                        rows = append(rows, reflectStruct(rt, rv.Index(i), namer, tag))
603
                }
604
        } else {
605
                rows = append(rows, reflectStruct(rt, rv, namer, tag))
606
        }
607
        
608
        return
609
}
func setValue
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

288
func setValue(pv reflect.Value, v any) error {
289
        
290
        if t := reflect.New(pv.Type()); t.Type().Implements(scannerType) {
291
                s := t.Interface().(sql.Scanner)
292
                err := s.Scan(v)
293
                if err != nil {
294
                        return err
295
                }
296
                pv.Set(t.Elem())
297
                return nil
298
        }
299
        
300
        vv := reflect.ValueOf(v)
301
        
302
        switch vv.Kind() {
303
        case reflect.Bool:
304
                return setBool(pv, vv)
305
        case reflect.Int,
306
                reflect.Int8,
307
                reflect.Int16,
308
                reflect.Int32,
309
                reflect.Int64,
310
                reflect.Uint,
311
                reflect.Uint8,
312
                reflect.Uint16,
313
                reflect.Uint32,
314
                reflect.Uint64,
315
                reflect.Float32,
316
                reflect.Float64:
317
                return setNumber(pv, vv)
318
        case reflect.String:
319
                return setString(pv, vv)
320
        }
321
        
322
        switch pv.Interface().(type) {
323
        case time.Time:
324
                r, err := cast.ToTimeE(v)
325
                if err != nil {
326
                        return err
327
                }
328
                
329
                pv.Set(reflect.ValueOf(r))
330
        }
331
        
332
        return nil
333
}
func getText
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

120
func getText(ctx antlr.ParserRuleContext) string {
121
122
        if ctx.GetChildCount() == 0 {
123
                return ""
124
        }
125
126
        var s string
127
        for _, child := range ctx.GetChildren() {
128
                _, ok := child.(*xml.AttributeContext)
129
                if ok {
130
                        s += " " + child.(antlr.ParseTree).GetText()
131
                } else {
132
                        s += child.(antlr.ParseTree).GetText()
133
                }
134
        }
135
136
        return s
137
}
func InsertBatch.execute
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

246
func (i *InsertBatch) execute(conn Conn, raw *Raw, logger Logger, pos string, trace, debug bool, ibs *insertBatchScanner, scan func(Scanner) error) (err error) {
247
        d := NewDefault(conn, raw)
248
        d.clean = false
249
        err = d.Execute(logger, pos, trace, debug, nil, nil)
250
        if err != nil {
251
                return
252
        }
253
        defer func() {
254
                if d.rows != nil {
255
                        err = AddError(err, d.rows.Close())
256
                }
257
        }()
258
        if d.result != nil {
259
                lastInsertId, _ := d.result.LastInsertId()
260
                rowsAffected, _ := d.result.RowsAffected()
261
                ibs.lastInsertId = lastInsertId
262
                ibs.rowsAffected += rowsAffected
263
        }
264
        ibs.rows = d.rows
265
        err = scan(ibs)
266
        if err != nil {
267
                return
268
        }
269
        return
270
}
func exprParser.realVars
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

976
func (p *exprParser) realVars() ([]interface{}, error) {
977
        for i, v := range p.vars {
978
                n, ok := v.(Valuer)
979
                if ok {
980
                        vv, err := n.Value()
981
                        if err != nil {
982
                                return nil, err
983
                        }
984
                        p.vars[i] = vv
985
                }
986
        }
987
        return p.vars, nil
988
}
func isStructSlice
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

60
func isStructSlice(r reflect.Type) bool {
61
        if r.Kind() != reflect.Slice {
62
                return false
63
        }
64
        elem := r.Elem()
65
        for {
66
                if elem.Kind() != reflect.Ptr {
67
                        break
68
                }
69
                elem = elem.Elem()
70
        }
71
        return elem.Kind() == reflect.Struct
72
}
func @71:8
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

71
func() {
72
                if d.clean {
73
                        if d.rows != nil {
74
                                err = AddError(err, d.rows.Close())
75
                        }
76
                        if !d.conn.IsTx() {
77
                                err = AddError(err, d.conn.Close())
78
                        }
79
                }
80
                if s == nil {
81
                        s = &scanner{}
82
                }
83
                logger.Trace(pos, d.conn.TraceId(), d.conn.IsTx(), err, &SQLTrace{
84
                        Trace:        trace,
85
                        Debug:        debug,
86
                        BeginAt:      beginAt,
87
                        RawSQL:       d.sql,
88
                        PlainSQL:     "",
89
                        RowsAffected: s.rowsAffected,
90
                })
91
        }
func FetchQuery.Execute
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

304
func (f *FetchQuery) Execute(logger Logger, pos string, trace, debug bool, affect any, scan func(Scanner) error) (err error) {
305
        
306
        conn := f.conn
307
        
308
        var tx *sql.Tx
309
        defer func() {
310
                if tx != nil {
311
                        if err != nil {
312
                                now := time.Now()
313
                                err = AddError(err, tx.Rollback())
314
                                logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
315
                                        Trace:        trace,
316
                                        Debug:        debug,
317
                                        BeginAt:      now,
318
                                        RawSQL:       "rollback",
319
                                        PlainSQL:     "rollback",
320
                                        RowsAffected: 0,
321
                                })
322
                        }
323
                }
324
        }()
325
        
326
        if !conn.IsTx() {
327
                tx, err = conn.BeginTx(f.ctx, nil)
328
                if err != nil {
329
                        return
330
                }
331
                conn = NewTx(tx, conn.TraceId())
332
        }
333
        
334
        cursor := fmt.Sprintf("curosr_%s", conn.TraceId())
335
        
336
        d := NewDefault(conn, &Raw{
337
                Ctx:    f.ctx,
338
                Query:  false,
339
                SQL:    fmt.Sprintf("declare %s cursor for %s", cursor, f.raw.SQL),
340
                Params: f.raw.Params,
341
        })
342
        err = d.Execute(logger, pos, trace, debug, affect, nil)
343
        if err != nil {
344
                return
345
        }
346
        
347
        defer func() {
348
                d = NewDefault(conn, &Raw{
349
                        Ctx:    f.ctx,
350
                        Query:  false,
351
                        SQL:    fmt.Sprintf("close %s", cursor),
352
                        Params: nil,
353
                })
354
                err = AddError(err, d.Execute(logger, pos, trace, debug, affect, nil))
355
                
356
                now := time.Now()
357
                err = AddError(err, tx.Commit())
358
                
359
                logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
360
                        Trace:        trace,
361
                        Debug:        debug,
362
                        BeginAt:      now,
363
                        RawSQL:       "commit",
364
                        PlainSQL:     "commit",
365
                        RowsAffected: 0,
366
                })
367
        }()
368
        
369
        for {
370
                d = NewDefault(conn, &Raw{
371
                        Ctx:    f.ctx,
372
                        Query:  true,
373
                        SQL:    fmt.Sprintf("fetch forward %d from %s", f.limit, cursor),
374
                        Params: nil,
375
                })
376
                var rowsAffected int64
377
                err = d.Execute(logger, pos, trace, debug, affect, func(s Scanner) error {
378
                        e := scan(s)
379
                        if e != nil {
380
                                return e
381
                        }
382
                        rowsAffected = s.RowsAffected()
383
                        return nil
384
                })
385
                if err != nil {
386
                        return
387
                }
388
                if rowsAffected == 0 {
389
                        break
390
                }
391
        }
392
        
393
        return
394
}
func SplitStructSlice
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

74
func SplitStructSlice(data any, limit int) ([]any, error) {
75
        val := reflect.ValueOf(data)
76
        
77
        if !isStructSlice(val.Type()) {
78
                return nil, fmt.Errorf("expected a struct slice, got %s", val.Type())
79
        }
80
        
81
        sliceLen := val.Len()
82
        if sliceLen == 0 {
83
                return nil, fmt.Errorf("got empty slice")
84
        }
85
        
86
        var result []any
87
        for i := 0; i < sliceLen; i += limit {
88
                end := i + limit
89
                if end > sliceLen {
90
                        end = sliceLen
91
                }
92
                
93
                subSlice := val.Slice(i, end)
94
                result = append(result, subSlice.Interface())
95
        }
96
        
97
        return result, nil
98
}
func xmlNodeStack.Pop
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

309
func (p *xmlNodeStack) Pop() *xmlNode {
310
        p.lock.Lock()
311
        defer p.lock.Unlock()
312
        e := p.list.Back()
313
        if e != nil {
314
                p.list.Remove(e)
315
                return e.Value.(*xmlNode)
316
        }
317
        return nil
318
}
func xmlNodeStack.Peak
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

320
func (p *xmlNodeStack) Peak() *xmlNode {
321
        p.lock.RLock()
322
        defer p.lock.RUnlock()
323
        e := p.list.Back()
324
        if e != nil {
325
                return e.Value.(*xmlNode)
326
        }
327
        return nil
328
}
func paramParser.addParam
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

631
func (p *paramParser) addParam(ctx antlr.ParserRuleContext, name, _type string, slice bool) {
632
        if p.check == nil {
633
                p.check = map[string]bool{}
634
        }
635
        if _, ok := p.check[name]; ok {
636
                throw(p.file, ctx, checkParameterErr).format("duplicated parameter '%s'", name)
637
        }
638
        p.check[name] = true
639
        p.params = append(p.params, &param{name: name, rt: _type, slice: slice})
640
}
func affectConstraint.Check
Back

In /Users/kun/gobatis/gobatis/executor/constraint.go:

41
func (a affectConstraint) Check(rows int) error {
42
        if a.sign != "" {
43
                if rows < a.rows {
44
                        return fmt.Errorf("%w: expect affected rows >= %d, got %d", RowsAffectedCheckErr, a.rows, rows)
45
                }
46
        } else {
47
                if rows != a.rows {
48
                        return fmt.Errorf("%w: expect affected rows = %d, got %d", RowsAffectedCheckErr, a.rows, rows)
49
                }
50
        }
51
        return nil
52
}
func Default.Execute
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

44
func (d *Default) Execute(logger Logger, pos string, trace, debug bool, affect any, scan func(Scanner) error) (err error) {
45
        
46
        beginAt := time.Now()
47
        
48
        var params []*param
49
        var vars []reflect.Value
50
        for _, v := range d.raw.Params {
51
                params = append(params, &param{
52
                        name: v.Name,
53
                        rt:   reflect.TypeOf(v.Value).Name(),
54
                })
55
                vars = append(vars, reflect.ValueOf(v.Value))
56
        }
57
        
58
        var node *xmlNode
59
        node, err = parseSQL("test.file", fmt.Sprintf("<sql>%s</sql>", d.raw.SQL))
60
        if err != nil {
61
                return
62
        }
63
        
64
        d.fragment = &fragment{node: node, in: params}
65
        d.sql, d.exprs, d.vars, d.dynamic, err = d.fragment.parseStatement(vars...)
66
        if err != nil {
67
                return
68
        }
69
        var s *scanner
70
        
71
        defer func() {
72
                if d.clean {
73
                        if d.rows != nil {
74
                                err = AddError(err, d.rows.Close())
75
                        }
76
                        if !d.conn.IsTx() {
77
                                err = AddError(err, d.conn.Close())
78
                        }
79
                }
80
                if s == nil {
81
                        s = &scanner{}
82
                }
83
                logger.Trace(pos, d.conn.TraceId(), d.conn.IsTx(), err, &SQLTrace{
84
                        Trace:        trace,
85
                        Debug:        debug,
86
                        BeginAt:      beginAt,
87
                        RawSQL:       d.sql,
88
                        PlainSQL:     "",
89
                        RowsAffected: s.rowsAffected,
90
                })
91
        }()
92
        
93
        if d.raw.Query {
94
                d.rows, err = d.conn.QueryContext(d.raw.Ctx, d.sql, d.vars...)
95
                if err != nil {
96
                        return
97
                }
98
        } else {
99
                d.result, err = d.conn.ExecContext(d.raw.Ctx, d.sql, d.vars...)
100
                if err != nil {
101
                        return
102
                }
103
        }
104
        
105
        if d.raw.Query {
106
                s = &scanner{
107
                        rows:         d.rows,
108
                        rowsAffected: 0,
109
                        lastInsertId: 0,
110
                }
111
                err = d.scan(s, scan)
112
        } else {
113
                rowsAffected, _ := d.result.RowsAffected()
114
                lastInsertId, _ := d.result.LastInsertId()
115
                s = &scanner{
116
                        rows:         nil,
117
                        rowsAffected: rowsAffected,
118
                        lastInsertId: lastInsertId,
119
                }
120
                err = d.scan(s, scan)
121
        }
122
        if err != nil {
123
                return
124
        }
125
        
126
        if affect != nil {
127
                var ac *affectConstraint
128
                ac, err = newAffectConstraint(affect)
129
                if err != nil {
130
                        return
131
                }
132
                err = ac.Check(int(s.rowsAffected))
133
                if err != nil {
134
                        return
135
                }
136
        }
137
        
138
        return
139
}
func InsertBatch.Execute
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

167
func (i *InsertBatch) Execute(logger Logger, pos string, trace, debug bool, affect any, scan func(Scanner) error) (err error) {
168
        
169
        conn := i.conn
170
        
171
        var tx *sql.Tx
172
        defer func() {
173
                if tx != nil {
174
                        if err != nil {
175
                                now := time.Now()
176
                                err = AddError(err, tx.Rollback())
177
                                logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
178
                                        Trace:        trace,
179
                                        Debug:        debug,
180
                                        BeginAt:      now,
181
                                        RawSQL:       "rollback",
182
                                        PlainSQL:     "rollback",
183
                                        RowsAffected: 0,
184
                                })
185
                        }
186
                }
187
        }()
188
        
189
        if !conn.IsTx() {
190
                now := time.Now()
191
                tx, err = conn.BeginTx(i.ctx, nil)
192
                if err != nil {
193
                        return
194
                }
195
                conn = NewTx(tx, conn.TraceId())
196
                logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
197
                        Trace:        trace,
198
                        Debug:        debug,
199
                        BeginAt:      now,
200
                        RawSQL:       "begin",
201
                        PlainSQL:     "begin",
202
                        RowsAffected: 0,
203
                })
204
        }
205
        
206
        ibs := &insertBatchScanner{}
207
        for _, raw := range i.raws {
208
                err = i.execute(conn, raw, logger, pos, trace, debug, ibs, func(s Scanner) error {
209
                        return scan(s)
210
                })
211
                if err != nil {
212
                        return
213
                }
214
        }
215
        
216
        if affect != nil {
217
                var ac *affectConstraint
218
                ac, err = newAffectConstraint(affect)
219
                if err != nil {
220
                        return
221
                }
222
                err = ac.Check(int(ibs.rowsAffected))
223
                if err != nil {
224
                        return
225
                }
226
        }
227
        
228
        now := time.Now()
229
        err = tx.Commit()
230
        if err != nil {
231
                return
232
        }
233
        
234
        logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
235
                Trace:        trace,
236
                Debug:        debug,
237
                BeginAt:      now,
238
                RawSQL:       "commit",
239
                PlainSQL:     "commit",
240
                RowsAffected: 0,
241
        })
242
        
243
        return
244
}
func scanner.Scan
Back

In /Users/kun/gobatis/gobatis/executor/scanner.go:

32
func (s *scanner) Scan(ptr any) (err error) {
33
        if s.rows == nil {
34
                err = fmt.Errorf("scan rows error: rows is nil")
35
                return
36
        }
37
        var pv reflect.Value
38
        if ptr != nil {
39
                pv = reflect.ValueOf(ptr)
40
                if pv.Kind() != reflect.Pointer || pv.IsNil() {
41
                        return &InvalidUnmarshalError{pv.Type()}
42
                }
43
                pv = indirect(pv, false)
44
        }
45
        columns, err := s.rows.Columns()
46
        if err != nil {
47
                return
48
        }
49
        l := len(columns)
50
        first := false
51
        s.rowsAffected = 0
52
        for s.rows.Next() {
53
                s.rowsAffected++
54
                if ptr != nil {
55
                        row := make([]interface{}, l)
56
                        pointers := make([]interface{}, l)
57
                        for i, _ := range columns {
58
                                pointers[i] = &row[i]
59
                        }
60
                        err = s.rows.Scan(pointers...)
61
                        if err != nil {
62
                                return
63
                        }
64
                        if !first {
65
                                first = true
66
                        }
67
                        var end bool
68
                        end, err = reflectRow(columns, row, pv, first)
69
                        if err != nil {
70
                                return
71
                        }
72
                        if end {
73
                                break
74
                        }
75
                }
76
        }
77
        //if s.rowsAffected == 0 {
78
        //        err = sql.ErrNoRows
79
        //        return
80
        //}
81
        return
82
}
func exprParser.parseExpression
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1206
func (p *exprParser) parseExpression(nodeCtx antlr.ParserRuleContext,
1207
        expression string) (result interface{}, static bool, err error) {
1208
1209
        defer func() {
1210
                e := recover()
1211
                err = castRecoverError(p.file, e)
1212
        }()
1213
1214
        p.nodeCtx = nodeCtx
1215
        p.static = false
1216
        p.valueStack = newValueStack()
1217
        p.coverage = newCoverage()
1218
1219
        parser := initExprParser(expression)
1220
        antlr.ParseTreeWalkerDefault.Walk(p, parser.Expressions())
1221
1222
        if !p.coverage.covered() {
1223
                p.throw(nil, parseCoveredErr).format(
1224
                        "parse expression token not covered: %d/%d",
1225
                        p.coverage.len(), p.coverage.total,
1226
                )
1227
        }
1228
1229
        if p.valueStack.len() != 1 {
1230
                p.throw(nil, popResultErr).format("expect result stack length: 1, got %d", p.valueStack.len())
1231
        }
1232
        v, err := p.valueStack.pop()
1233
        if err != nil {
1234
                p.throw(nil, popResultErr).with(err)
1235
        }
1236
        result = v.value
1237
        static = p.static
1238
1239
        return
1240
}
func fragment.parseStatement
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

110
func (p *fragment) parseStatement(args ...reflect.Value) (sql string, exprs []string, vars []interface{},
111
        dynamic bool, err error) {
112
113
        defer func() {
114
                e := recover()
115
                err = castRecoverError(p.node.File, e)
116
        }()
117
118
        if len(p.in) != len(args) {
119
                throw(p.node.File, p.node.ctx, parasFragmentErr).format("expect %d args, got %d", len(p.in), len(args))
120
        }
121
122
        parser := newExprParser(args...)
123
        for i, v := range p.in {
124
                err = parser.paramsStack.list.Front().Next().Value.(*exprParams).bind(v, i)
125
                if err != nil {
126
                        throw(p.node.File, p.node.ctx, parasFragmentErr).with(err)
127
                }
128
        }
129
        res := new(psr)
130
        p.parseBlocks(parser, p.node, res)
131
132
        sql = res.sql
133
        vars, err = parser.realVars()
134
        if err != nil {
135
                return
136
        }
137
        exprs = parser.exprs
138
        dynamic = res.dynamic
139
140
        return
141
}
func setStruct
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

381
func setStruct(pv reflect.Value, r rowMap) (err error) {
382
        
383
        //var tags map[string]struct{}
384
        //if first {
385
        //        tags = map[string]struct{}{}
386
        //}
387
        
388
        t := pv.Type()
389
        for i := 0; i < t.NumField(); i++ {
390
                n := prepareFieldName(t.Field(i))
391
                //if first {
392
                //        if _, ok := tags[n]; ok {
393
                //                return fmt.Errorf("field tag: '%s' is duplicated in struct: '%s'", n, _type)
394
                //        }
395
                //        tags[n] = struct{}{}
396
                //}
397
                v, ok := r[n]
398
                if !ok {
399
                        // TODO
400
                        //if !false {
401
                        //        return fmt.Errorf("no data for struct: '%s' field: '%s'", _type, _type.Field(i).Name)
402
                        //}
403
                } else if v != nil {
404
                        err = setValue(indirect(pv.Field(i), false), v)
405
                        if err != nil {
406
                                err = fmt.Errorf("parse column: %s value error: %w", n, err)
407
                                return
408
                        }
409
                }
410
        }
411
        
412
        return
413
}
func _error.Error
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

81
func (p *_error) Error() string {
82
        msg := fmt.Sprintf("[ERROR %d]: %s", p.code, p.message)
83
        line := 0
84
        column := 0
85
        ctx := ""
86
        if p.parent != nil {
87
                line = p.parent.GetStart().GetLine()
88
                column = p.parent.GetStart().GetColumn()
89
                ctx = getText(p.parent)
90
        } else if p.ctx != nil {
91
                line = p.ctx.GetStart().GetLine()
92
                column = p.ctx.GetStart().GetColumn()
93
                ctx = getText(p.ctx)
94
        }
95
        if p.ctx != nil {
96
                msg += fmt.Sprintf("\n[file]: %s near line %d column %d:\n[context]: %s", p.file, line, column+1, ctx)
97
        }
98
99
        return msg
100
}
func insertBatchScanner.Scan
Back

In /Users/kun/gobatis/gobatis/executor/scanner.go:

90
func (i *insertBatchScanner) Scan(ptr any) error {
91
        rv := reflect.ValueOf(ptr)
92
        if rv.Elem().Type().Kind() != reflect.Slice {
93
                return fmt.Errorf("expect slice, got %s", rv.Elem().Type())
94
        }
95
        s := &scanner{rows: i.rows}
96
        err := s.Scan(ptr)
97
        if err != nil {
98
                return err
99
        }
100
        i.rowsAffected += s.rowsAffected
101
        i.lastInsertId = s.lastInsertId
102
        return nil
103
}
func @377:54
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

377
func(s Scanner) error {
378
                        e := scan(s)
379
                        if e != nil {
380
                                return e
381
                        }
382
                        rowsAffected = s.RowsAffected()
383
                        return nil
384
                }
func paramsStack.getVar
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

945
func (p *paramsStack) getVar(name string) (exprValue, bool) {
946
        for i := p.list.Back(); i != nil; i = i.Prev() {
947
                v := i.Value.(*exprParams)
948
                if r, ok := v.get(name); ok {
949
                        return r, true
950
                }
951
        }
952
        return exprValue{}, false
953
}
func setBool
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

493
func setBool(pv reflect.Value, vv reflect.Value) (err error) {
494
        pv = indirect(pv, false)
495
        if pv.Kind() == reflect.Bool {
496
                pv.Set(vv)
497
                return nil
498
        }
499
        return fmt.Errorf("unsupport reflect type %s to %s", vv.Type(), pv.Type())
500
}
func setString
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

484
func setString(pv reflect.Value, vv reflect.Value) error {
485
        pv = indirect(pv, false)
486
        if pv.Kind() == reflect.String {
487
                pv.Set(vv)
488
                return nil
489
        }
490
        return fmt.Errorf("unsupport reflect type %s to %s", vv.Type(), pv.Type())
491
}
func CallFuncPos
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

101
func CallFuncPos(skip int) string {
102
        i := skip
103
        for {
104
                _, file, line, ok := runtime.Caller(i)
105
                if !ok || i > 20 {
106
                        break
107
                }
108
                if !strings.Contains(file, "/gobatis/gobatis") || strings.HasSuffix(file, "_test.go") {
109
                        return fmt.Sprintf("%s:%d", file, line)
110
                }
111
                i++
112
        }
113
        return ""
114
}
func exprParser.ExitVar_
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1047
func (p *exprParser) ExitVar_(ctx *expr.Var_Context) {
1048
        p.static = false
1049
        alias := ctx.IDENTIFIER().GetText()
1050
        var val exprValue
1051
        if _builtin.is(alias) {
1052
                val = exprValue{value: _builtin.get(alias), alias: alias}
1053
        } else {
1054
                var ok bool
1055
                val, ok = p.paramsStack.getVar(alias)
1056
                if !ok {
1057
                        p.throw(ctx, parameterNotFoundErr).format("var '%s' not found", alias)
1058
                        return
1059
                }
1060
        }
1061
        p.valueStack.push(&val)
1062
        p.coverage.add(ctx)
1063
}
func newAffectConstraint
Back

In /Users/kun/gobatis/gobatis/executor/constraint.go:

14
func newAffectConstraint(v any) (*affectConstraint, error) {
15
        
16
        switch r := v.(type) {
17
        case int:
18
                return &affectConstraint{rows: r}, nil
19
        case string:
20
                reg := regexp.MustCompile(`^([0-9]+)(\+)?$`)
21
                if !reg.MatchString(r) {
22
                        return nil, fmt.Errorf("%w; got: %s", InvalidAffectValueErr, r)
23
                }
24
                items := reg.FindStringSubmatch(r)
25
                var rows int64
26
                rows, err := strconv.ParseInt(items[1], 10, 64)
27
                if err != nil {
28
                        return nil, fmt.Errorf("db.Affect() parse value: %s to int error: %w", r, err)
29
                }
30
                return &affectConstraint{rows: int(rows), sign: items[2]}, nil
31
        default:
32
                return nil, InvalidAffectValueErr
33
        }
34
}
func handleSlice
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

577
func handleSlice(_type string) (string, bool) {
578
        slice := strings.HasPrefix(_type, "[]")
579
        if slice {
580
                return strings.TrimSpace(strings.TrimPrefix(_type, "[]")), true
581
        }
582
        return _type, false
583
}
func prepareFieldName
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

208
func prepareFieldName(f reflect.StructField) string {
209
        field := f.Tag.Get("db")
210
        if field == "" {
211
                field = toSnakeCase(f.Name)
212
        }
213
        return trimComma(field)
214
}
func ExtractTag
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

615
func ExtractTag(s string) string {
616
        idx := strings.Index(s, ";")
617
        if idx == -1 {
618
                return s
619
        }
620
        return s[:idx]
621
}
func exprParams.bind
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

866
func (p *exprParams) bind(expected *param, index int) error {
867
868
        if expected.name == "" {
869
                return fmt.Errorf("parameter name is empty")
870
        }
871
872
        if p.check == nil {
873
                p.check = map[string]int{}
874
        } else {
875
                _, ok := p.check[expected.name]
876
                if ok {
877
                        return fmt.Errorf("duplicated parameter '%s'", expected.name)
878
                }
879
        }
880
881
        vl := len(p.values) - 1
882
        if index < 0 || index > vl {
883
                return fmt.Errorf("parameter '%s' index %d out of parameters length %d", expected.name, index, vl)
884
        }
885
886
        ev := p.values[index]
887
        p.check[expected.name] = index
888
889
        if cast.IsNil(ev.value) {
890
                return nil
891
        }
892
893
        // TODO check
894
        //elem := toReflectValueElem(ev.value)
895
        //if !expected.expected(elem.Type()) {
896
        //        return fmt.Errorf("parameter '%s' expected '%s', got '%s'", expected.name, expected.Type(), elem.Type())
897
        //}
898
899
        return nil
900
}
func parseSQL
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

18
func parseSQL(file, content string) (node *xmlNode, err error) {
19
20
        defer func() {
21
                //e := recover()
22
                //err = castRecoverError(file, e)
23
        }()
24
25
        l := &xmlParser{
26
                BaseParseTreeListener: nil,
27
                coverage:              newCoverage(),
28
                file:                  file,
29
                content:               nil,
30
                depth:                 0,
31
                stack:                 newXMLStack(),
32
                rootNode:              nil,
33
                //rootElement:           dtd.Mapper,
34
                elementGetter: dtd.MapperElement,
35
        }
36
37
        // replace single < to &lt;
38
        content = replaceIsolatedLessThanWithEntity(content)
39
40
        walkXMLNodes(l, content)
41
        if !l.coverage.covered() {
42
                throw(file, nil, parseCoveredErr).
43
                        format("parse mapper token not covered: %d/%d", l.coverage.len(), l.coverage.total)
44
        }
45
46
        if l.rootNode == nil {
47
                spew.Json(fmt.Sprintf("empty mapperCache file: %s", file))
48
                return
49
        }
50
        node = l.rootNode
51
52
        //spew.Json(l.rootNode)
53
        //for _, v := range l.rootNode.Nodes {
54
        //        switch v.Name {
55
        //        case dtd.SELECT, dtd.INSERT, dtd.DELETE, dtd.UPDATE, dtd.SQL:
56
        //                id := v.GetAttribute(dtd.ID)
57
        //                if id == "" {
58
        //                        throw(file, v.ctx, parseMapperErr).format("fragment: %s miss id", v.Name)
59
        //                }
60
        //                db.addFragment(file, v.ctx, id, v)
61
        //        }
62
        //}
63
        return
64
}
func xmlParser.exitElement
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

459
func (p *xmlParser) exitElement(_ *xml.ElementContext) {
460
        if p.stack.Peak() == nil {
461
                return
462
        }
463
        p.depth--
464
        child := p.stack.Pop()
465
466
        if p.stack.Len() > 0 {
467
                p.stack.Peak().AddNode(child)
468
        } else {
469
                p.rootNode = child
470
                //p.validateNode(child, p.rootElement)
471
        }
472
}
func exprParser.popBinaryOperands
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1252
func (p *exprParser) popBinaryOperands() (left, right *exprValue, err error) {
1253
        right, err = p.valueStack.pop()
1254
        if err != nil {
1255
                return
1256
        }
1257
        left, err = p.valueStack.pop()
1258
        if err != nil {
1259
                return
1260
        }
1261
        return
1262
}
func exprParams.get
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

841
func (p *exprParams) get(name string) (val exprValue, ok bool) {
842
        if p.check == nil {
843
                return
844
        }
845
        index, ok := p.check[name]
846
        if !ok {
847
                return
848
        }
849
        if index > len(p.values)-1 {
850
                return
851
        }
852
        ok = true
853
        val = p.values[index]
854
        return
855
}
func xmlParser.EnterEveryRule
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

496
func (p *xmlParser) EnterEveryRule(ctx antlr.ParserRuleContext) {
497
        switch ctx.GetRuleIndex() {
498
        case xml.XMLParserRULE_document:
499
                p.coverage.setTotal(ctx.GetStop().GetTokenIndex() + 1)
500
        case xml.XMLParserRULE_reference:
501
                p.enterReference(ctx.(*xml.ReferenceContext))
502
        case xml.XMLParserRULE_element:
503
                p.enterElement(ctx.(*xml.ElementContext))
504
                p.coverage.add(ctx)
505
        case xml.XMLParserRULE_attribute:
506
                p.enterAttribute(ctx.(*xml.AttributeContext))
507
                p.coverage.add(ctx)
508
        case xml.XMLParserRULE_chardata:
509
                p.enterChardata(ctx.(*xml.ChardataContext))
510
                p.coverage.add(ctx)
511
        case xml.XMLParserRULE_prolog, xml.XMLParserRULE_misc:
512
                p.coverage.add(ctx)
513
        }
514
515
}
func indirect
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

506
func indirect(v reflect.Value, decodingNull bool) reflect.Value {
507
        // Issue #24153 indicates that it is generally not a guaranteed property
508
        // that you may round-trip a reflect.Value by calling Value.Addr().Elem()
509
        // and expect the value to still be settable for values derived from
510
        // unexported embedded struct fields.
511
        //
512
        // The logic below effectively does this when it first addresses the value
513
        // (to satisfy possible pointer methods) and continues to dereference
514
        // subsequent pointers as necessary.
515
        //
516
        // After the first round-trip, we set v back to the original value to
517
        // preserve the original RW flags contained in reflect.Value.
518
        v0 := v
519
        haveAddr := false
520
        
521
        // If v is a named type and is addressable,
522
        // start with its address, so that if the type has pointer methods,
523
        // we find them.
524
        if v.Kind() != reflect.Pointer && v.Type().Name() != "" && v.CanAddr() {
525
                haveAddr = true
526
                v = v.Addr()
527
        }
528
        for {
529
                // Load value from interface, but only if the result will be
530
                // usefully addressable.
531
                if v.Kind() == reflect.Interface && !v.IsNil() {
532
                        e := v.Elem()
533
                        if e.Kind() == reflect.Pointer && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Pointer) {
534
                                haveAddr = false
535
                                v = e
536
                                continue
537
                        }
538
                }
539
                
540
                if v.Kind() != reflect.Pointer {
541
                        break
542
                }
543
                
544
                if decodingNull && v.CanSet() {
545
                        break
546
                }
547
                
548
                // Prevent infinite loop if v is an interface pointing to its own address:
549
                //     var v interface{}
550
                //     v = &v
551
                if v.Elem().Kind() == reflect.Interface && v.Elem().Elem() == v {
552
                        v = v.Elem()
553
                        break
554
                }
555
                if v.IsNil() {
556
                        v.Set(reflect.New(v.Type().Elem()))
557
                }
558
                
559
                if haveAddr {
560
                        v = v0 // restore original value after round-trip Value.Addr().Elem()
561
                        haveAddr = false
562
                } else {
563
                        v = v.Elem()
564
                }
565
        }
566
        return v
567
}
func valueStack.pop
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

800
func (p *valueStack) pop() (val *exprValue, err error) {
801
        if p.list.Len() < 1 {
802
                err = fmt.Errorf("stack is empty unable to pop")
803
                return
804
        }
805
        e := p.list.Back()
806
        if e != nil {
807
                p.list.Remove(e)
808
                val = e.Value.(*exprValue)
809
                return
810
        }
811
        return
812
}
func literalEqual
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

477
func literalEqual(pv, vv reflect.Value) error {
478
        if fmt.Sprintf("%v", pv.Interface()) != fmt.Sprintf("%v", vv.Interface()) {
479
                return fmt.Errorf("convert type %s:%v to %s:%v miss data", vv.Type(), vv.Interface(), pv.Type(), pv.Interface())
480
        }
481
        return nil
482
}
func xmlParser.enterChardata
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

489
func (p *xmlParser) enterChardata(c *xml.ChardataContext) {
490
        if p.stack.Peak() == nil {
491
                return
492
        }
493
        p.stack.Peak().AddNode(&xmlNode{File: p.file, Text: c.GetText(), ctx: c, start: c.GetStart(), textOnly: true})
494
}
func paramParser.walkMethods
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

623
func (p *paramParser) walkMethods(parser *expr.ExprParser) {
624
        antlr.ParseTreeWalkerDefault.Walk(p, parser.Parameters())
625
        if !p.coverage.covered() {
626
                throw(p.file, nil, parseCoveredErr).
627
                        format("parse mapper method not covered: %d/%d", p.coverage.len(), p.coverage.total)
628
        }
629
}
func trimComma
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

216
func trimComma(field string) string {
217
        if strings.Contains(field, ",") {
218
                return strings.TrimSpace(strings.Split(field, ",")[0])
219
        }
220
        return field
221
}
func xmlParser.enterReference
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

437
func (p *xmlParser) enterReference(c *xml.ReferenceContext) {
438
        if c.EntityRef() != nil {
439
                v := ""
440
                switch c.EntityRef().GetText() {
441
                case "&lt;":
442
                        v = "<"
443
                case "&gt":
444
                        v = ">"
445
                case "&amp;":
446
                        v = "&"
447
                case "&apos;":
448
                        v = "'"
449
                case "&quot;":
450
                        v = "\""
451
                }
452
                if v != "" {
453
                        p.stack.Peak().AddNode(&xmlNode{File: p.file, Text: v, ctx: c, start: c.GetStart(), textOnly: true})
454
                        p.coverage.add(c)
455
                }
456
        }
457
}
func setArray
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

335
func setArray(pv reflect.Value, r rowMap) (err error) {
336
        
337
        t := pv.Type().Elem()
338
        ptr := false
339
        if t.Kind() == reflect.Ptr {
340
                ptr = true
341
                for {
342
                        if t.Kind() != reflect.Ptr {
343
                                break
344
                        }
345
                        t = t.Elem()
346
                }
347
        }
348
        switch t.Kind() {
349
        case reflect.Struct:
350
                if ptr {
351
                        pv.Set(reflect.Append(pv, reflect.New(pv.Type().Elem().Elem())))
352
                } else {
353
                        pv.Set(reflect.Append(pv, reflect.New(pv.Type().Elem()).Elem()))
354
                }
355
                err = setStruct(indirect(pv.Index(pv.Len()-1), false), r)
356
                if err != nil {
357
                        return
358
                }
359
        default:
360
                // TODO 反射数组单值
361
                if ptr {
362
                        pv.Set(reflect.Append(pv, reflect.New(pv.Type().Elem().Elem())))
363
                } else {
364
                        pv.Set(reflect.Append(pv, reflect.New(pv.Type().Elem()).Elem()))
365
                }
366
                var a any
367
                for _, vv := range r {
368
                        a = vv
369
                }
370
                err = setValue(indirect(pv.Index(pv.Len()-1), false), a)
371
                if err != nil {
372
                        return
373
                }
374
                //err = fmt.Errorf("expect struct, got: %s", t.String())
375
                return
376
        }
377
        
378
        return
379
}
func exprParser.numericStringCalc
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1280
func (p *exprParser) numericStringCalc(left, right *exprValue, ctx antlr.ParserRuleContext, op antlr.Token) {
1281
1282
        var err error
1283
        var result interface{}
1284
        switch op.GetTokenType() {
1285
        case expr.ExprParserPLUS:
1286
                result, err = cast.AddAnyE(left.value, right.value)
1287
        case expr.ExprParserMINUS:
1288
                result, err = cast.SubAnyE(left.value, right.value)
1289
        case expr.ExprParserSTAR:
1290
                result, err = cast.MulAnyE(left.value, right.value)
1291
        case expr.ExprParserDIV:
1292
                result, err = cast.DivAnyE(left.value, right.value)
1293
        case expr.ExprParserCARET:
1294
                result, err = cast.CaretAnyE(left.value, right.value)
1295
        case expr.ExprParserOR:
1296
                result, err = cast.OrAnyE(left.value, right.value)
1297
        case expr.ExprParserMOD:
1298
                result, err = cast.ModAnyE(left.value, right.value)
1299
        case expr.ExprParserLSHIFT:
1300
                result, err = cast.LeftShiftAnyE(left.value, right.value)
1301
        case expr.ExprParserRSHIFT:
1302
                result, err = cast.RightShiftAnyE(left.value, right.value)
1303
        case expr.ExprParserBIT_CLEAR:
1304
                result, err = cast.BitClearAnyE(left.value, right.value)
1305
        default:
1306
                p.throw(ctx, unsupportedNumericCalc).format("unsupported numeric calc")
1307
        }
1308
        if err != nil {
1309
                p.throw(ctx, numericCalcErr).with(err)
1310
        }
1311
1312
        p.valueStack.push(&exprValue{value: result})
1313
}
func @309:8
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

309
func() {
310
                if tx != nil {
311
                        if err != nil {
312
                                now := time.Now()
313
                                err = AddError(err, tx.Rollback())
314
                                logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
315
                                        Trace:        trace,
316
                                        Debug:        debug,
317
                                        BeginAt:      now,
318
                                        RawSQL:       "rollback",
319
                                        PlainSQL:     "rollback",
320
                                        RowsAffected: 0,
321
                                })
322
                        }
323
                }
324
        }
func AddError
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

188
func AddError(err, added error) error {
189
        if err == nil {
190
                return added
191
        } else if added != nil {
192
                return fmt.Errorf("%v; %w", err, added)
193
        }
194
        return err
195
}
func @172:8
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

172
func() {
173
                if tx != nil {
174
                        if err != nil {
175
                                now := time.Now()
176
                                err = AddError(err, tx.Rollback())
177
                                logger.Trace(pos, conn.TraceId(), true, err, &SQLTrace{
178
                                        Trace:        trace,
179
                                        Debug:        debug,
180
                                        BeginAt:      now,
181
                                        RawSQL:       "rollback",
182
                                        PlainSQL:     "rollback",
183
                                        RowsAffected: 0,
184
                                })
185
                        }
186
                }
187
        }
func setNumber
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

415
func setNumber(pv reflect.Value, vv reflect.Value) (err error) {
416
        pv = indirect(pv, false)
417
        switch pv.Kind() {
418
        case reflect.Int,
419
                reflect.Int8,
420
                reflect.Int16,
421
                reflect.Int32,
422
                reflect.Int64:
423
                var v int64
424
                if vv.CanInt() {
425
                        v = vv.Int()
426
                } else if vv.CanUint() {
427
                        v = int64(vv.Uint())
428
                } else if vv.CanFloat() {
429
                        v = int64(vv.Float())
430
                }
431
                pv.SetInt(v)
432
                err = literalEqual(pv, vv)
433
                if err != nil {
434
                        return
435
                }
436
                return
437
        case reflect.Uint,
438
                reflect.Uint8,
439
                reflect.Uint16,
440
                reflect.Uint32,
441
                reflect.Uint64:
442
                var v uint64
443
                if vv.CanUint() {
444
                        v = vv.Uint()
445
                } else if vv.CanInt() {
446
                        v = uint64(vv.Int())
447
                } else if vv.CanFloat() {
448
                        v = uint64(vv.Float())
449
                }
450
                pv.SetUint(v)
451
                err = literalEqual(pv, vv)
452
                if err != nil {
453
                        return
454
                }
455
                return
456
        case reflect.Float32,
457
                reflect.Float64:
458
                var v float64
459
                if vv.CanFloat() {
460
                        v = vv.Float()
461
                } else if vv.CanInt() {
462
                        v = float64(vv.Int())
463
                } else if vv.CanUint() {
464
                        v = float64(vv.Uint())
465
                }
466
                pv.SetFloat(v)
467
                //err = literalEqual(pv, vv)
468
                //if err != nil {
469
                //        return
470
                //}
471
                return
472
        default:
473
                return fmt.Errorf("unsupport reflect type %s to %s", vv.Type(), pv.Type())
474
        }
475
}
func exprParser.ExitExpression
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1006
func (p *exprParser) ExitExpression(ctx *expr.ExpressionContext) {
1007
        if ctx.GetUnary_op() != nil {
1008
                left, err := p.valueStack.pop()
1009
                if err != nil {
1010
                        p.throw(ctx, popValueStackErr).with(err)
1011
                }
1012
                p.unaryCalc(left, ctx, ctx.GetUnary_op())
1013
                p.coverage.add(ctx)
1014
        } else if ctx.GetMul_op() != nil ||
1015
                ctx.GetAdd_op() != nil ||
1016
                ctx.GetRel_op() != nil ||
1017
                ctx.Logical() != nil {
1018
                left, right, err := p.popBinaryOperands()
1019
                if err != nil {
1020
                        p.throw(ctx, popBinaryOperandsErr).with(err)
1021
                }
1022
                if ctx.GetAdd_op() != nil {
1023
                        p.numericStringCalc(left, right, ctx, ctx.GetAdd_op())
1024
                        p.coverage.add(ctx)
1025
                } else if ctx.GetMul_op() != nil {
1026
                        p.numericStringCalc(left, right, ctx, ctx.GetMul_op())
1027
                        p.coverage.add(ctx)
1028
                } else if ctx.GetRel_op() != nil {
1029
                        p.relationCalc(left, right, ctx, ctx.GetRel_op())
1030
                        p.coverage.add(ctx)
1031
                } else if ctx.Logical() != nil {
1032
                        p.static = false
1033
                        p.logicCalc(left, right, ctx, ctx.Logical().GetStart())
1034
                        p.coverage.add(ctx)
1035
                }
1036
        } else if ctx.GetTertiary() != nil {
1037
                p.static = false
1038
                condition, left, right, err := p.popTertiaryOperands()
1039
                if err != nil {
1040
                        p.throw(ctx, popTertiaryOperandsErr).with(err)
1041
                }
1042
                p.coverage.add(ctx)
1043
                p.tertiaryCalc(condition, left, right, ctx)
1044
        }
1045
}
func castRecoverError
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

102
func castRecoverError(file string, e interface{}) error {
103
        if e != nil {
104
                _e, ok := e.(*_error)
105
                if ok {
106
                        if _e.file == "" {
107
                                _e.file = file
108
                        }
109
                        return _e
110
                }
111
                return &_error{
112
                        code:    unknownErr,
113
                        file:    file,
114
                        message: fmt.Sprintf("%v", e),
115
                }
116
        }
117
        return nil
118
}
func fragment.parseBlock
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

202
func (p *fragment) parseBlock(parser *exprParser, node *xmlNode, res *psr) {
203
        if node.textOnly {
204
                p.parseSql(parser, node, res)
205
        } else {
206
                res.dynamic = true
207
                switch node.Name {
208
                case dtd.IF:
209
                        r := new(psr)
210
                        if p.parseTest(parser, node, r) {
211
                                res.merge(r)
212
                        }
213
                case dtd.WHERE:
214
                        p.parseWhere(parser, node, res)
215
                case dtd.CHOOSE:
216
                        p.parseChoose(parser, node, res)
217
                case dtd.FOREACH:
218
                        p.parseForeach(parser, node, res)
219
                case dtd.TRIM:
220
                        p.parseTrim(parser, node, res)
221
                case dtd.SET:
222
                        p.parseSet(parser, node, res)
223
                }
224
        }
225
}
func fragment.parseForeach
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

305
func (p *fragment) parseForeach(parser *exprParser, node *xmlNode, res *psr) {
306
307
        _var := node.GetAttribute(dtd.COLLECTION)
308
        collection, ok := parser.paramsStack.getVar(_var)
309
        if !ok {
310
                throw(p.node.File, p.node.ctx, parasFragmentErr).
311
                        format("can't get foreach collection '%s' value", _var)
312
        }
313
        index := node.GetAttribute(dtd.INDEX)
314
        if index == "" {
315
                index = dtd.INDEX
316
        }
317
        item := node.GetAttribute(dtd.ITEM)
318
        slice := false
319
        if item == "" {
320
                item = dtd.ITEM
321
        } else {
322
                item, slice = handleSlice(item)
323
        }
324
        indexParam := &param{name: index, rt: reflect.Interface.String(), slice: false}
325
        itemParam := &param{name: item, rt: reflect.Interface.String(), slice: slice}
326
        open := node.GetAttribute(dtd.OPEN)
327
        _close := node.GetAttribute(dtd.CLOSE)
328
        separator := node.GetAttribute(dtd.SEPARATOR)
329
330
        parser.paramsStack.push(newExprParams())
331
        elem := toReflectValueElem(collection.value)
332
        frags := make([]string, 0)
333
        switch elem.Kind() {
334
        case reflect.Slice, reflect.Array:
335
                for i := 0; i < elem.Len(); i++ {
336
                        parser.paramsStack.peak().values = []exprValue{{value: i}, {value: elem.Index(i).Interface()}}
337
                        if i == 0 {
338
                                p.bindForeachParams(parser, indexParam, itemParam)
339
                        }
340
                        p.parseForeachChild(parser, node, &frags)
341
                }
342
        case reflect.Map:
343
                for i, v := range elem.MapKeys() {
344
                        parser.paramsStack.peak().values = []exprValue{{value: v.Interface()}, {value: elem.MapIndex(v).Interface()}}
345
                        if i == 0 {
346
                                p.bindForeachParams(parser, indexParam, itemParam)
347
                        }
348
                        p.parseForeachChild(parser, node, &frags)
349
                }
350
        case reflect.Struct:
351
                for i := 0; i < elem.NumField(); i++ {
352
                        parser.paramsStack.peak().values = []exprValue{{value: elem.Type().Field(i).Name}, {value: elem.Field(i).Interface()}}
353
                        if i == 0 {
354
                                p.bindForeachParams(parser, indexParam, itemParam)
355
                        }
356
                        p.parseForeachChild(parser, node, &frags)
357
                }
358
        default:
359
                throw(parser.file, node.ctx, parasFragmentErr).format("foreach collection type '%s' can't range", elem.Type())
360
        }
361
        _, err := parser.paramsStack.pop()
362
        if err != nil {
363
                throw(parser.file, node.ctx, popParamsStackErr).with(err)
364
        }
365
        if len(frags) > 0 {
366
                res.merge(&psr{
367
                        sql: open + strings.Join(frags, separator) + _close,
368
                })
369
        }
370
}
func exprValue.call
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

725
func (p *exprValue) call(ellipsis bool, params []reflect.Value) (r *exprValue, err error) {
726
727
        elem := toReflectValueElem(p.value)
728
        if elem.Kind() != reflect.Func {
729
                err = fmt.Errorf("visit '%s' is not func", elem.Kind())
730
                return
731
        }
732
        var out []reflect.Value
733
        defer func() {
734
                e := recover()
735
                if e != nil {
736
                        err = fmt.Errorf("function call error: %v", e)
737
                        return
738
                }
739
        }()
740
        for i, v := range params {
741
                if i < elem.Type().NumIn() {
742
                        va := elem.Type().In(i)
743
                        if va.Kind() != reflect.Interface && va.String() != v.Type().String() {
744
                                var vt interface{}
745
                                vt, err = cast.ToReflectTypeE(va, v.Interface())
746
                                if err == nil {
747
                                        params[i] = reflect.ValueOf(vt)
748
                                }
749
                        }
750
                }
751
        }
752
        if ellipsis {
753
                out = elem.CallSlice(params)
754
        } else {
755
                out = elem.Call(params)
756
        }
757
758
        if len(out) == 0 {
759
                err = fmt.Errorf("function must return one reuslt")
760
                return
761
        } else if len(out) > 1 {
762
                err = fmt.Errorf("function only support one result return")
763
                return
764
        }
765
766
        r = &exprValue{
767
                value: out[0].Interface(),
768
        }
769
        return
770
}
func varToReflectKind
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

135
func varToReflectKind(t string) (kind reflect.Kind, err error) {
136
        switch t {
137
        case "bool":
138
                kind = reflect.Bool
139
        case "int":
140
                kind = reflect.Int
141
        case "int8":
142
                kind = reflect.Int8
143
        case "int16":
144
                kind = reflect.Int16
145
        case "int32":
146
                kind = reflect.Int32
147
        case "int64":
148
                kind = reflect.Int64
149
        case "uint":
150
                kind = reflect.Uint
151
        case "uint8":
152
                kind = reflect.Uint8
153
        case "uint16":
154
                kind = reflect.Uint16
155
        case "uint32":
156
                kind = reflect.Uint32
157
        case "uint64":
158
                kind = reflect.Uint64
159
        case "float32":
160
                kind = reflect.Float32
161
        case "float64":
162
                kind = reflect.Float64
163
        case "complex64":
164
                kind = reflect.Complex64
165
        case "complex128":
166
                kind = reflect.Complex128
167
        case "array":
168
                kind = reflect.Array
169
        case "slice":
170
                kind = reflect.Slice
171
        case "interface":
172
                kind = reflect.Interface
173
        case "map":
174
                kind = reflect.Map
175
        case "string":
176
                kind = reflect.String
177
        case "struct":
178
                kind = reflect.Struct
179
        default:
180
                err = fmt.Errorf("unsupported var type '%s'", t)
181
        }
182
        return
183
}
func exprParser.ExitIndex
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1081
func (p *exprParser) ExitIndex(ctx *expr.IndexContext) {
1082
1083
        index, err := p.valueStack.pop()
1084
        if err != nil {
1085
                p.throw(ctx, popValueStackErr).with(err)
1086
        }
1087
1088
        object, err := p.valueStack.pop()
1089
        if err != nil {
1090
                p.throw(ctx, popValueStackErr).with(err)
1091
        }
1092
        objectReflectElem := toReflectValueElem(object.value)
1093
        var ev *exprValue
1094
        if objectReflectElem.Kind() == reflect.Map {
1095
                ev, err = object.visitMap(toReflectValueElem(index.value))
1096
                if err != nil {
1097
                        p.throw(ctx, visitMapErr).with(err)
1098
                }
1099
        } else if objectReflectElem.Kind() == reflect.Slice || objectReflectElem.Kind() == reflect.Array {
1100
                var i int
1101
                i, err = index.int()
1102
                if err != nil {
1103
                        p.throw(ctx, visitArrayErr).format("parse array index error: %s", err)
1104
                }
1105
1106
                ev, err = object.visitArray(i)
1107
                if err != nil {
1108
                        p.throw(ctx, visitArrayErr).format("visit array error: %s", err)
1109
                }
1110
1111
        } else {
1112
                p.throw(ctx, indexErr).format("parameter unsupported index")
1113
        }
1114
        p.valueStack.push(ev)
1115
        p.coverage.add(ctx)
1116
}
func xmlParser.validateNode
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

354
func (p *xmlParser) validateNode(node *xmlNode, elem *dtd.Element) {
355
356
        // check required attributes
357
        if elem.Attributes != nil {
358
                for k, v := range elem.Attributes {
359
                        if v == dtd.REQUIRED && !node.HasAttribute(k) {
360
                                throw(p.file, node.ctx, validateXMLNodeErr).
361
                                        format("element: %s miss required attribute: %s", node.Name, k)
362
                        }
363
                }
364
        }
365
366
        switch node.Name {
367
        case dtd.SELECT, dtd.INSERT, dtd.UPDATE, dtd.DELETE:
368
                p.checkResultConflict(node)
369
        }
370
371
        for _, childNode := range node.Nodes {
372
373
                if childNode.textOnly {
374
                        continue
375
                }
376
377
                // check not supported node
378
                if !elem.HasNode(childNode.Name) {
379
                        throw(p.file, childNode.ctx, validateXMLNodeErr).
380
                                format("element: %s not support child element: %s", node.Name, childNode.Name)
381
                }
382
383
                // check at most once node
384
                if elem.GetNodeCount(childNode.Name) == dtd.AT_MOST_ONCE && node.countNode(childNode.Name) > 1 {
385
                        throw(p.file, childNode.ctx, validateXMLNodeErr).
386
                                format("element: %s not support duplicate element: %s", node.Name, childNode.Name)
387
                }
388
389
                childElem, err := p.elementGetter(childNode.Name)
390
                if err != nil {
391
                        throw(p.file, childNode.ctx, validateXMLNodeErr).with(err)
392
                }
393
394
                p.validateNode(childNode, childElem)
395
        }
396
397
        // check at least once node
398
        if elem.Nodes != nil {
399
                for k, v := range elem.Nodes {
400
                        if v == dtd.AT_LEAST_ONCE && node.countNode(k) == 0 {
401
                                throw(p.file, node.ctx, validateXMLNodeErr).
402
                                        format("element %s miss required element %s", node.Name, k)
403
                        }
404
                }
405
        }
406
}
func fragment.parseChoose
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

248
func (p *fragment) parseChoose(parser *exprParser, node *xmlNode, res *psr) {
249
        var pass bool
250
        var oc int
251
        for _, child := range node.Nodes {
252
                if pass {
253
                        break
254
                }
255
                switch child.Name {
256
                case dtd.WHEN:
257
                        r := new(psr)
258
                        if p.parseTest(parser, child, r) {
259
                                res.merge(r)
260
                                return
261
                        }
262
                case dtd.OTHERWISE:
263
                        oc++
264
                        p.parseBlocks(parser, child, res)
265
                        return
266
                default:
267
                        if child.textOnly {
268
                                if strings.TrimSpace(child.Text) == "" {
269
                                        continue
270
                                }
271
                                child.Name = "TEXT"
272
                        }
273
                        throw(parser.file, child.ctx, parasFragmentErr).
274
                                format("unsupported element '%s' element in choose", child.Name)
275
                }
276
        }
277
        if oc != 1 {
278
                throw(parser.file, node.ctx, parasFragmentErr).format("choose except 1 otherwise, got %d", oc)
279
        }
280
}
func param.expected
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

537
func (p param) expected(vt reflect.Type) bool {
538
539
        vt = reflectTypeElem(vt)
540
        if p.slice {
541
                if vt.Kind() != reflect.Slice && vt.Kind() != reflect.Array {
542
                        return false
543
                }
544
                vt = vt.Elem()
545
        }
546
        vt = reflectTypeElem(vt)
547
548
        switch p.rt {
549
        case reflect.Interface.String():
550
                return true
551
        case reflect.Struct.String():
552
                if vt.Kind() == reflect.Struct {
553
                        return true
554
                } else {
555
                        return false
556
                }
557
        case reflect.Map.String():
558
                if vt.Kind() == reflect.Map {
559
                        return true
560
                } else {
561
                        return false
562
                }
563
        case reflect.Slice.String(), reflect.Array.String():
564
                if vt.Kind() == reflect.Slice || vt.Kind() == reflect.Array {
565
                        return true
566
                } else {
567
                        return false
568
                }
569
        default:
570
                if vt.String() == p.rt {
571
                        return true
572
                }
573
                return false
574
        }
575
}
func TestSetValueBasic
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

724
func TestSetValueBasic(t *testing.T) {
725
        
726
        var a *int
727
        rv := reflect.ValueOf(&a)
728
        err := setValue(rv, 1)
729
        require.NoError(t, err)
730
        t.Log(*a)
731
        
732
        var b int8
733
        rv = reflect.ValueOf(&b)
734
        err = setValue(rv, 9)
735
        require.NoError(t, err)
736
        t.Log(b)
737
        
738
        var c float32
739
        rv = reflect.ValueOf(&c)
740
        err = setValue(rv, 3)
741
        require.NoError(t, err)
742
        t.Log(c)
743
        
744
        var d string
745
        rv = reflect.ValueOf(&d)
746
        err = setValue(rv, "hello world")
747
        require.NoError(t, err)
748
        t.Log(d)
749
}
func exprParser.ExitCall
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1143
func (p *exprParser) ExitCall(ctx *expr.CallContext) {
1144
        var l = 0
1145
        if ctx.ExpressionList() != nil {
1146
                l = len(ctx.ExpressionList().(*expr.ExpressionListContext).AllExpression())
1147
        }
1148
        args := make([]reflect.Value, l)
1149
        for i := l - 1; i >= 0; i-- {
1150
                arg, err := p.valueStack.pop()
1151
                if err != nil {
1152
                        p.throw(ctx, popValueStackErr).with(err)
1153
                }
1154
                args[i] = toReflectValueElem(arg.value)
1155
        }
1156
        f, err := p.valueStack.pop()
1157
        if err != nil {
1158
                p.throw(ctx, popValueStackErr).with(err)
1159
        }
1160
        r, err := f.call(ctx.ELLIPSIS() != nil, args)
1161
        if err != nil {
1162
                p.throw(ctx, callErr).with(err)
1163
        }
1164
        p.valueStack.push(r)
1165
        p.coverage.add(ctx)
1166
}
func exprParser.ExitSlice_
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1118
func (p *exprParser) ExitSlice_(ctx *expr.Slice_Context) {
1119
        l := len(ctx.AllExpression())
1120
        args := make([]int, l)
1121
        for i := l - 1; i >= 0; i-- {
1122
                arg, err := p.valueStack.pop()
1123
                if err != nil {
1124
                        p.throw(ctx, popValueStackErr).with(err)
1125
                }
1126
                args[i], err = arg.int()
1127
                if err != nil {
1128
                        p.throw(ctx, visitArrayErr).with(err)
1129
                }
1130
        }
1131
        target, err := p.valueStack.pop()
1132
        if err != nil {
1133
                p.throw(ctx, popValueStackErr).with(err)
1134
        }
1135
        r, err := target.visitSlice(ctx.GetText(), args...)
1136
        if err != nil {
1137
                p.throw(ctx, visitArrayErr).with(err)
1138
        }
1139
        p.valueStack.push(r)
1140
        p.coverage.add(ctx)
1141
}
func fragment.call
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

57
func (p *fragment) call(_type reflect.Type, in ...reflect.Value) []reflect.Value {
58
59
        c := &caller{fragment: p, args: in}
60
        for i := 0; i < _type.NumOut()-1; i++ {
61
                if _type.Out(i).Kind() == reflect.Ptr {
62
                        c.values = append(c.values, reflect.New(_type.Out(i).Elem()))
63
                } else {
64
                        c.values = append(c.values, reflect.New(_type.Out(i)))
65
                }
66
        }
67
68
        var err error
69
        if err != nil {
70
                if err == sql.ErrNoRows {
71
                        //if p.must {
72
                        //        c.values = append(c.values, reflect.ValueOf(err))
73
                        //} else {
74
                        //        c.values = append(c.values, reflect.Zero(errorType))
75
                        //}
76
                } else {
77
                        c.values = append(c.values, reflect.ValueOf(err))
78
                }
79
        } else {
80
                c.values = append(c.values, reflect.Zero(errorType))
81
        }
82
83
        for i := 0; i < _type.NumOut()-1; i++ {
84
                if _type.Out(i).Kind() == reflect.Ptr {
85
                        if err == sql.ErrNoRows {
86
                                c.values[i] = reflect.Zero(c.values[i].Type())
87
                        }
88
                } else {
89
                        c.values[i] = c.values[i].Elem()
90
                }
91
        }
92
93
        return c.values
94
}
func exprParser.relationCalc
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1315
func (p *exprParser) relationCalc(left, right *exprValue, ctx antlr.ParserRuleContext, op antlr.Token) {
1316
1317
        var err error
1318
        var result bool
1319
        switch op.GetTokenType() {
1320
        case expr.ExprParserEQUALS:
1321
                result, err = cast.EqualAnyE(left.value, right.value)
1322
        case expr.ExprParserNOT_EQUALS:
1323
                result, err = cast.NotEqualAnyE(left.value, right.value)
1324
        case expr.ExprParserLESS:
1325
                result, err = cast.LessAnyE(left.value, right.value)
1326
        case expr.ExprParserLESS_OR_EQUALS:
1327
                result, err = cast.LessOrEqualAnyE(left.value, right.value)
1328
        case expr.ExprParserGREATER:
1329
                result, err = cast.GreaterAnyE(left.value, right.value)
1330
        case expr.ExprParserGREATER_OR_EQUALS:
1331
                result, err = cast.GreaterOrEqualAnyE(left.value, right.value)
1332
        default:
1333
                p.throw(ctx, unsupportedRelationCalcErr).format("unsupported relation calc")
1334
        }
1335
        if err != nil {
1336
                p.throw(ctx, relationCalcError).with(err)
1337
1338
        }
1339
        p.valueStack.push(&exprValue{value: result})
1340
}
func exprValue.visitMember
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

664
func (p *exprValue) visitMember(name string) (r *exprValue, err error) {
665
666
        elem := toReflectValueElem(p.value)
667
        if elem.Kind() != reflect.Struct {
668
                err = fmt.Errorf("visit '%s.%s' is not struct", p.alias, name)
669
                return
670
        }
671
672
        mv := elem.FieldByName(name)
673
        if mv.Kind() == reflect.Invalid {
674
                mv = elem.MethodByName(name)
675
                if mv.Kind() == reflect.Invalid {
676
                        err = fmt.Errorf("visit member '%s.%s' is invalid", p.alias, name)
677
                        return
678
                }
679
        }
680
681
        r = &exprValue{
682
                value: mv.Interface(),
683
        }
684
685
        return
686
}
func exprParser.unaryCalc
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1342
func (p *exprParser) unaryCalc(left *exprValue, ctx antlr.ParserRuleContext, op antlr.Token) {
1343
        var err error
1344
        var result interface{}
1345
        switch op.GetTokenType() {
1346
        case expr.ExprParserPLUS:
1347
                result, err = cast.UnaryPlusAnyE(left.value)
1348
        case expr.ExprParserMINUS:
1349
                result, err = cast.UnaryMinusAnyE(left.value)
1350
        case expr.ExprParserCARET:
1351
                result, err = cast.UnaryCaretAnyE(left.value)
1352
        case expr.ExprParserEXCLAMATION:
1353
                result, err = cast.UnaryNotAnyE(left.value)
1354
        default:
1355
                p.throw(ctx, unsupportedUnaryCalc).format("unsupported %s%v", ctx.GetText(), left.value)
1356
        }
1357
        if err != nil {
1358
                p.throw(ctx, unaryCalcError).with(err)
1359
        }
1360
        p.valueStack.push(&exprValue{value: result})
1361
}
func xmlParser.checkResultConflict
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

408
func (p *xmlParser) checkResultConflict(node *xmlNode) {
409
        l := map[string]bool{}
410
        if node.HasAttribute(dtd.RESULT) {
411
                l[dtd.RESULT] = true
412
        }
413
        if node.HasAttribute(dtd.RESULT_MAP) {
414
                l[dtd.RESULT_MAP] = true
415
        }
416
        if len(l) > 1 {
417
                attrs := ""
418
                for k := range l {
419
                        attrs += k + ", "
420
                }
421
                attrs = strings.TrimSuffix(attrs, ", ")
422
                throw(p.file, node.ctx, resultAttributeConflictErr).format("%s attribute conflict", attrs)
423
        }
424
}
func exprValue.visitArray
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

688
func (p *exprValue) visitArray(index int) (r *exprValue, err error) {
689
690
        elem := toReflectValueElem(p.value)
691
        if elem.Kind() != reflect.Array && elem.Kind() != reflect.Slice {
692
                err = fmt.Errorf("visit var is not array or slice")
693
                return
694
        }
695
696
        mv := elem.Index(index)
697
        if mv.Kind() == reflect.Invalid {
698
                err = fmt.Errorf("visit array index '%d' is invalid", index)
699
                return
700
        }
701
        r = &exprValue{
702
                value: mv.Interface(),
703
        }
704
        return
705
}
func fragment.parseTest
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

227
func (p *fragment) parseTest(parser *exprParser, node *xmlNode, res *psr) bool {
228
        v, _, err := parser.parseExpression(node.ctx, node.GetAttribute(dtd.TEST))
229
        if err != nil {
230
                throw(p.node.File, p.node.ctx, parasFragmentErr).with(err)
231
        }
232
        b, err := cast.ToBoolE(v)
233
        if err != nil {
234
                throw(p.node.File, p.node.ctx, parasFragmentErr).with(err)
235
        }
236
        if !b {
237
                return false
238
        }
239
        p.parseBlocks(parser, node, res)
240
241
        return true
242
}
func exprValue.visitMap
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

707
func (p *exprValue) visitMap(index reflect.Value) (r *exprValue, err error) {
708
709
        elem := toReflectValueElem(p.value)
710
        if elem.Kind() != reflect.Map {
711
                err = fmt.Errorf("visit '%s' is not map", elem.Kind())
712
                return
713
        }
714
715
        mv := elem.MapIndex(index)
716
        r = &exprValue{}
717
        if mv.Kind() == reflect.Invalid {
718
                r.value = nil
719
        } else {
720
                r.value = mv.Interface()
721
        }
722
        return
723
}
func fragment.trimPrefixOverrides
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

286
func (p *fragment) trimPrefixOverrides(parser *exprParser, node *xmlNode, res *psr, tag, prefixes string) {
287
        wr := new(psr)
288
        p.parseBlocks(parser, node, wr)
289
        var err error
290
        s := strings.TrimSpace(wr.sql)
291
        filters := strings.Split(prefixes, "|")
292
        for _, v := range filters {
293
                s, err = p.trimPrefixOverride(s, v)
294
                if err != nil {
295
                        throw(p.node.File, p.node.ctx, parasFragmentErr).format("regexp compile error: %s", err)
296
                }
297
        }
298
        res.sql = fmt.Sprintf("%s %s %s", res.sql, tag, s)
299
}
func exprParser.popTertiaryOperands
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1264
func (p *exprParser) popTertiaryOperands() (condition, left, right *exprValue, err error) {
1265
        right, err = p.valueStack.pop()
1266
        if err != nil {
1267
                return
1268
        }
1269
        left, err = p.valueStack.pop()
1270
        if err != nil {
1271
                return
1272
        }
1273
        condition, err = p.valueStack.pop()
1274
        if err != nil {
1275
                return
1276
        }
1277
        return
1278
}
func exprParser.ExitMember
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1065
func (p *exprParser) ExitMember(ctx *expr.MemberContext) {
1066
        name := ctx.IDENTIFIER().GetText()
1067
        obj, err := p.valueStack.pop()
1068
        if err != nil {
1069
                p.throw(ctx, popValueStackErr).with(err)
1070
        }
1071
        var mev *exprValue
1072
        mev, err = obj.visitMember(name)
1073
        if err != nil {
1074
                p.throw(ctx, visitMemberErr).with(err)
1075
        }
1076
1077
        p.valueStack.push(mev)
1078
        p.coverage.add(ctx)
1079
}
func paramsStack.pop
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

915
func (p *paramsStack) pop() (val *exprParams, err error) {
916
        if p.list.Len() < 1 {
917
                err = fmt.Errorf("stack is empty unable to pop")
918
                return
919
        }
920
        e := p.list.Back()
921
        if e != nil {
922
                p.list.Remove(e)
923
                val = e.Value.(*exprParams)
924
                return
925
        }
926
        return
927
}
func printVars
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

120
func printVars(vars []interface{}) string {
121
        if len(vars) == 0 {
122
                return ""
123
        }
124
        r := "\n"
125
        for i, v := range vars {
126
                _t := ""
127
                if v != nil {
128
                        _t = reflect.TypeOf(v).String()
129
                }
130
                r += fmt.Sprintf("   $%d %s (%s) %+v\n",
131
                        i+1, chalk.Green.Color("=>"), chalk.Yellow.Color(_t), v)
132
        }
133
        return r
134
}
func exprValue.visitSlice
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

772
func (p *exprValue) visitSlice(format string, indexes ...int) (r *exprValue, err error) {
773
        var v reflect.Value
774
        switch len(indexes) {
775
        case 2:
776
                v = toReflectValueElem(p.value).Slice(indexes[0], indexes[1])
777
        case 3:
778
                v = toReflectValueElem(p.value).Slice3(indexes[0], indexes[1], indexes[2])
779
        default:
780
                err = fmt.Errorf("unsuppoted slice range index '%s'", format)
781
                return
782
        }
783
        r = &exprValue{value: v.Interface()}
784
        return
785
}
func exprParser.logicCalc
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1363
func (p *exprParser) logicCalc(left, right *exprValue, ctx antlr.ParserRuleContext, op antlr.Token) {
1364
1365
        var err error
1366
        var result interface{}
1367
        switch op.GetTokenType() {
1368
        case expr.ExprParserLOGICAL_AND, expr.ExprParserLOGICAL_AND_LOWER, expr.ExprParserLOGICAL_AND_UPPER:
1369
                result, err = cast.LogicAndAnyE(left.value, right.value)
1370
        case expr.ExprParserLOGICAL_OR, expr.ExprParserLOGICAL_OR_LOWER, expr.ExprParserLOGICAL_OR_UPPER:
1371
                result, err = cast.LogicOrAnyE(left.value, right.value)
1372
        }
1373
        if err != nil {
1374
                p.throw(ctx, logicCalcErr).with(err)
1375
        }
1376
        p.valueStack.push(&exprValue{value: result})
1377
}
func fragment.bindForeachParams
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

372
func (p *fragment) bindForeachParams(parser *exprParser, indexParam, itemParam *param) {
373
        parser.paramsStack.peak().check = map[string]int{}
374
        err := parser.paramsStack.peak().bind(indexParam, 0)
375
        if err != nil {
376
                throw(p.node.File, p.node.ctx, varBindErr).with(err)
377
        }
378
        err = parser.paramsStack.peak().bind(itemParam, 1)
379
        if err != nil {
380
                throw(p.node.File, p.node.ctx, varBindErr).with(err)
381
        }
382
}
func fragment.checkParameter
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

96
func (p *fragment) checkParameter(ft reflect.Type, mn, fn string) {
97
        ac := 0
98
        for i := 0; i < ft.NumIn(); i++ {
99
                if isContext(ft.In(i)) || isTx(ft.In(i)) || isDB(ft.In(i)) {
100
                        continue
101
                }
102
                ac++
103
        }
104
        if len(p.in) != ac {
105
                throw(p.node.File, p.node.ctx, checkParameterErr).
106
                        format("%s.%s expected %d bind parameter, got %d", mn, fn, len(p.in), ac)
107
        }
108
}
func TestIndirect
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

708
func TestIndirect(t *testing.T) {
709
        
710
        var a *int
711
        rv := reflect.ValueOf(&a)
712
        
713
        t.Log(rv.Kind())
714
        
715
        rv = indirect(rv, false)
716
        
717
        t.Log(rv.Kind())
718
        
719
        rv.Set(reflect.ValueOf(3))
720
        
721
        t.Log(*a)
722
}
func fragment.parseForeachChild
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

390
func (p *fragment) parseForeachChild(parser *exprParser, node *xmlNode, frags *[]string) {
391
        r := ""
392
        for _, child := range node.Nodes {
393
                br := new(psr)
394
                p.parseBlock(parser, child, br)
395
                r += br.sql
396
        }
397
        *frags = append(*frags, r)
398
}
func caller.execer
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

419
func (p *caller) execer(in []reflect.Value) (execer, int) {
420
        if len(in) > 0 {
421
                t := reflect.TypeOf(new(execer)).Elem()
422
                for i, v := range in {
423
                        if v.Type().Implements(t) {
424
                                return v.Interface().(execer), i
425
                        }
426
                }
427
        }
428
        return nil, -1
429
}
func exprParser.tertiaryCalc
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1379
func (p *exprParser) tertiaryCalc(condition, left, right *exprValue, ctx antlr.ParserRuleContext) {
1380
1381
        ok, err := cast.ToBoolE(condition.value)
1382
        if err != nil {
1383
                p.throw(ctx, castBoolErr).with(err)
1384
        }
1385
        if ok {
1386
                p.valueStack.push(left)
1387
        } else {
1388
                p.valueStack.push(right)
1389
        }
1390
}
func caller.queryer
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

431
func (p *caller) queryer(in []reflect.Value) (queryer, int) {
432
        if len(in) > 0 {
433
                t := reflect.TypeOf(new(queryer)).Elem()
434
                for i, v := range in {
435
                        if v.Type().Implements(t) {
436
                                return v.Interface().(queryer), i
437
                        }
438
                }
439
        }
440
        return nil, -1
441
}
func xmlNode.GetAttribute
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

251
func (p *xmlNode) GetAttribute(name string) string {
252
        if p.Attributes == nil {
253
                return ""
254
        }
255
        v, ok := p.Attributes[name]
256
        if ok {
257
                return v.Value
258
        }
259
        return ""
260
}
func reflectTypeElem
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

110
func reflectTypeElem(vt reflect.Type) reflect.Type {
111
        for {
112
                if vt.Kind() != reflect.Ptr {
113
                        break
114
                }
115
                vt = vt.Elem()
116
        }
117
        return vt
118
}
func xmlParser.enterAttribute
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

474
func (p *xmlParser) enterAttribute(c *xml.AttributeContext) {
475
        // <?xml version="1.0" encoding="UTF-8" ?>
476
        if p.stack.Peak() == nil {
477
                return
478
        }
479
        name := strings.TrimSpace(c.Name().GetText())
480
        value := strings.TrimSpace(trimValueQuote(c.STRING().GetText()))
481
        p.stack.Peak().AddAttribute(name, &xmlNodeAttribute{
482
                File:  p.file,
483
                Value: value,
484
                Start: c.STRING().GetSymbol(),
485
                ctx:   c,
486
        })
487
}
func toReflectValueElem
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

114
func toReflectValueElem(source interface{}) reflect.Value {
115
        v := reflect.ValueOf(source)
116
        for {
117
                if v.Kind() == reflect.Ptr {
118
                        v = v.Elem()
119
                } else {
120
                        return v
121
                }
122
        }
123
}
func exprParser.ExitInteger
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1168
func (p *exprParser) ExitInteger(ctx *expr.IntegerContext) {
1169
        v, err := cast.ToIntE(ctx.GetText())
1170
        if err != nil {
1171
                p.throw(ctx, parseIntegerErr).with(err)
1172
        }
1173
        p.valueStack.push(&exprValue{
1174
                value:  v,
1175
                source: ctx.GetText(),
1176
        })
1177
        p.coverage.add(ctx)
1178
}
func exprParser.ExitFloat_
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1187
func (p *exprParser) ExitFloat_(ctx *expr.Float_Context) {
1188
        v, err := cast.ToDecimalE(ctx.GetText())
1189
        if err != nil {
1190
                p.throw(ctx, parseDecimalErr).with(err)
1191
        }
1192
        p.valueStack.push(&exprValue{
1193
                value:  v,
1194
                source: ctx.GetText(),
1195
        })
1196
        p.coverage.add(ctx)
1197
}
func InvalidUnmarshalError.Error
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

277
func (e *InvalidUnmarshalError) Error() string {
278
        if e.Type == nil {
279
                return "gobatis: Unmarshal(nil)"
280
        }
281
        
282
        if e.Type.Kind() != reflect.Pointer {
283
                return "gobatis: Unmarshal(non-pointer " + e.Type.String() + ")"
284
        }
285
        return "gobatis: Unmarshal(nil " + e.Type.String() + ")"
286
}
func reflectValueElem
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

100
func reflectValueElem(vt reflect.Value) reflect.Value {
101
        for {
102
                if vt.Kind() != reflect.Ptr {
103
                        break
104
                }
105
                vt = vt.Elem()
106
        }
107
        return vt
108
}
func fragment.trimPrefixOverride
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

143
func (p *fragment) trimPrefixOverride(sql, prefix string) (r string, err error) {
144
        reg, err := regexp.Compile(`(?i)^` + prefix)
145
        if err != nil {
146
                return
147
        }
148
        r = reg.ReplaceAllString(sql, "")
149
        return
150
}
func valueStack.peak
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

814
func (p *valueStack) peak() *exprValue {
815
        e := p.list.Back()
816
        if e != nil {
817
                return e.Value.(*exprValue)
818
        }
819
        return nil
820
}
func xmlNode.HasAttribute
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

269
func (p *xmlNode) HasAttribute(name string) bool {
270
        if p.Attributes == nil {
271
                return false
272
        }
273
        _, ok := p.Attributes[name]
274
        return ok
275
}
func @733:8
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

733
func() {
734
                e := recover()
735
                if e != nil {
736
                        err = fmt.Errorf("function call error: %v", e)
737
                        return
738
                }
739
        }
func _uint8
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

108
func _uint8(v interface{}) uint8 {
109
        r, err := cast.ToUint8E(v)
110
        if err != nil {
111
                panic(err)
112
        }
113
        return r
114
}
func _uint
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

100
func _uint(v interface{}) uint {
101
        r, err := cast.ToUintE(v)
102
        if err != nil {
103
                panic(err)
104
        }
105
        return r
106
}
func caller.context
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

410
func (p *caller) context(in []reflect.Value) (context.Context, int) {
411
        for i, v := range in {
412
                if isContext(v.Type()) {
413
                        return v.Interface().(context.Context), i
414
                }
415
        }
416
        return context.Background(), -1
417
}
func fragment.fork
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

44
func (p *fragment) fork() *fragment {
45
        n := new(fragment)
46
        n.node = p.node
47
        n.in = p.in
48
        return n
49
}
func _uint32
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

124
func _uint32(v interface{}) uint32 {
125
        r, err := cast.ToUint32E(v)
126
        if err != nil {
127
                panic(err)
128
        }
129
        return r
130
}
func psr.merge
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

30
func (p *psr) merge(s ...*psr) {
31
        for _, v := range s {
32
                p.sql += " " + strings.TrimSpace(v.sql)
33
                if !p.dynamic && v.dynamic {
34
                        p.dynamic = v.dynamic
35
                }
36
        }
37
}
func _uint64
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

132
func _uint64(v interface{}) uint64 {
133
        r, err := cast.ToUint64E(v)
134
        if err != nil {
135
                panic(err)
136
        }
137
        return r
138
}
func _int64
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

92
func _int64(v interface{}) int64 {
93
        r, err := cast.ToInt64E(v)
94
        if err != nil {
95
                panic(err)
96
        }
97
        return r
98
}
func _uint16
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

116
func _uint16(v interface{}) uint16 {
117
        r, err := cast.ToUint16E(v)
118
        if err != nil {
119
                panic(err)
120
        }
121
        return r
122
}
func _int32
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

84
func _int32(v interface{}) int32 {
85
        r, err := cast.ToInt32E(v)
86
        if err != nil {
87
                panic(err)
88
        }
89
        return r
90
}
func _int16
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

76
func _int16(v interface{}) int16 {
77
        r, err := cast.ToInt16E(v)
78
        if err != nil {
79
                panic(err)
80
        }
81
        return r
82
}
func coverage.notCovered
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

214
func (p *coverage) notCovered() (indexes []int) {
215
        for i := 0; i <= p.total; i++ {
216
                if _, ok := p.scan[i]; !ok {
217
                        indexes = append(indexes, i)
218
                }
219
        }
220
        return
221
}
func _string
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

156
func _string(v interface{}) string {
157
        r, err := cast.ToStringE(v)
158
        if err != nil {
159
                panic(err)
160
        }
161
        return r
162
}
func _int8
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

68
func _int8(v interface{}) int8 {
69
        r, err := cast.ToInt8E(v)
70
        if err != nil {
71
                panic(err)
72
        }
73
        return r
74
}
func paramsStack.peak
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

929
func (p *paramsStack) peak() *exprParams {
930
        e := p.list.Back()
931
        if e != nil {
932
                return e.Value.(*exprParams)
933
        }
934
        return nil
935
}
func _bool
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

148
func _bool(v interface{}) bool {
149
        r, err := cast.ToBoolE(v)
150
        if err != nil {
151
                panic(err)
152
        }
153
        return r
154
}
func _int
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

60
func _int(v interface{}) int {
61
        r, err := cast.ToIntE(v)
62
        if err != nil {
63
                panic(err)
64
        }
65
        return r
66
}
func builtin.get
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

42
func (p *builtin) get(name string) interface{} {
43
        p.mu.RLock()
44
        defer p.mu.RUnlock()
45
        v, _ := p._map[name]
46
        return v
47
}
func trimValueQuote
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

125
func trimValueQuote(s string) string {
126
        if len(s) > 1 {
127
                switch s[0] {
128
                case 34, 39:
129
                        return s[1 : len(s)-1]
130
                }
131
        }
132
        return s
133
}
func _decimal
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

140
func _decimal(v interface{}) decimal.Decimal {
141
        r, err := cast.ToDecimalE(v)
142
        if err != nil {
143
                panic(err)
144
        }
145
        return r
146
}
func isDB
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

49
func isDB(v reflect.Type) bool {
50
        if v.Kind() == reflect.Ptr && v.Elem().Name() == "DB" && v.Elem().PkgPath() == "github.com/gobatis/gobatis" {
51
                return true
52
        }
53
        return false
54
}
func param.Type
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

530
func (p param) Type() string {
531
        if p.slice {
532
                return fmt.Sprintf("[]%s", p.rt)
533
        }
534
        return p.rt
535
}
func parseFragment
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

90
func parseFragment(file, id string, node *xmlNode) (frag *fragment, err error) {
91
92
        defer func() {
93
                e := recover()
94
                err = castRecoverError(file, e)
95
        }()
96
97
        frag = &fragment{
98
                //db:   nil,
99
                //id:   id,
100
                node: node,
101
        }
102
103
        //frag.setResultAttribute()
104
105
        //if node.HasAttribute(dtd.PARAMETER) {
106
        //        frag.in = frag.parseParams(node.GetAttribute(dtd.PARAMETER))
107
        //}
108
        //if node.HasAttribute(dtd.RESULT) {
109
        //        frag.out = frag.parseParams(node.GetAttribute(dtd.RESULT))
110
        //}
111
        return
112
}
func isContext
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

33
func isContext(v reflect.Type) bool {
34
        if v.Name() == "Context" && v.PkgPath() == "context" {
35
                return true
36
        }
37
        return false
38
}
func xmlNode.AddAttribute
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

262
func (p *xmlNode) AddAttribute(name string, value *xmlNodeAttribute) {
263
        if p.Attributes == nil {
264
                p.Attributes = map[string]*xmlNodeAttribute{}
265
        }
266
        p.Attributes[name] = value
267
}
func xmlNode.countNode
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

285
func (p *xmlNode) countNode(name string) int {
286
        if p.nodesCount == nil {
287
                return 0
288
        }
289
        return p.nodesCount[name]
290
}
func xmlNodeStack.Empty
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

336
func (p *xmlNodeStack) Empty() bool {
337
        p.lock.RLock()
338
        defer p.lock.RUnlock()
339
        return p.list.Len() == 0
340
}
func isTx
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

40
func isTx(v reflect.Type) bool {
41
        if v.Kind() == reflect.Ptr && v.Elem().Name() == "Tx" &&
42
                (v.Elem().PkgPath() == "database/sql" ||
43
                        v.Elem().PkgPath() == "github.com/gobatis/gobatis") {
44
                return true
45
        }
46
        return false
47
}
func exprValue.convertible
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

653
func (p *exprValue) convertible(received, expected reflect.Kind) bool {
654
        if expected == reflect.Array && received == reflect.Slice {
655
                return true
656
        }
657
        return false
658
}
func @92:8
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

92
func() {
93
                e := recover()
94
                err = castRecoverError(file, e)
95
        }
func _error.with
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

76
func (p *_error) with(err error) {
77
        p.message = err.Error()
78
        panic(p)
79
}
func exprParser.ExitString_
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1180
func (p *exprParser) ExitString_(ctx *expr.String_Context) {
1181
        p.valueStack.push(&exprValue{
1182
                value: trimValueQuote(ctx.GetText()),
1183
        })
1184
        p.coverage.add(ctx)
1185
}
func _error.setParent
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

66
func (p *_error) setParent(ctx antlr.ParserRuleContext) *_error {
67
        p.parent = ctx
68
        return p
69
}
func exprParser.ExitNil_
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1199
func (p *exprParser) ExitNil_(ctx *expr.Nil_Context) {
1200
        p.valueStack.push(&exprValue{
1201
                value: nil,
1202
        })
1203
        p.coverage.add(ctx)
1204
}
func _strings.TrimSpace
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

189
func (p _strings) TrimSpace(s string) string                 { return strings.TrimSpace(s) }
func @52:43
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

52
func(args []reflect.Value) (results []reflect.Value) {
53
                return p.call(field.Type(), args...)
54
        }
func _strings.TrimSuffix
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

191
func (p _strings) TrimSuffix(s, suffix string) string        { return strings.TrimSuffix(s, suffix) }
func exprParser.throw
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

1248
func (p *exprParser) throw(ctx antlr.ParserRuleContext, code int) *_error {
1249
        return throw(p.file, ctx, code).setParent(p.nodeCtx)
1250
}
func _strings.TrimPrefix
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

190
func (p _strings) TrimPrefix(s, prefix string) string        { return strings.TrimPrefix(s, prefix) }
func exprParser.ExitMisc
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

998
func (p *exprParser) ExitMisc(ctx *expr.MiscContext) {
999
        p.coverage.add(ctx)
1000
}
func _strings.ReplaceAll
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

193
func (p _strings) ReplaceAll(s, old, new string) string      { return strings.ReplaceAll(s, old, new) }
func logger.Warnf
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

83
func (l logger) Warnf(format string, a ...any) {
84
        syslog.Printf(format, a...)
85
}
func _len
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

56
func _len(v interface{}) int {
57
        return reflect.ValueOf(v).Len()
58
}
func ParallelQuery.Query
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

278
func (p *ParallelQuery) Query() bool {
279
        return p.Raw.Query
280
}
func FetchQuery.Query
Back

In /Users/kun/gobatis/gobatis/executor/executor.go:

300
func (f *FetchQuery) Query() bool {
301
        return f.raw.Query
302
}
func _strings.TrimRight
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

188
func (p _strings) TrimRight(s, cutset string) string         { return strings.TrimRight(s, cutset) }
func _strings.TrimLeft
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

187
func (p _strings) TrimLeft(s, cutset string) string          { return strings.TrimLeft(s, cutset) }
func _strings.Trim
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

186
func (p _strings) Trim(s, cutset string) string              { return strings.Trim(s, cutset) }
func _strings.Title
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

185
func (p _strings) Title(s string) string                     { return strings.Title(s) }
func _strings.ToTitle
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

184
func (p _strings) ToTitle(s string) string                   { return strings.ToTitle(s) }
func _strings.ToLower
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

183
func (p _strings) ToLower(s string) string                   { return strings.ToLower(s) }
func _strings.ToUpper
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

182
func (p _strings) ToUpper(s string) string                   { return strings.ToUpper(s) }
func _strings.Repeat
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

181
func (p _strings) Repeat(s string, count int) string         { return strings.Repeat(s, count) }
func Tx.BeginTx
Back

In /Users/kun/gobatis/gobatis/executor/tx.go:

23
func (t *Tx) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) {
24
        return t.Tx, nil
25
}
func _strings.HasSuffix
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

180
func (p _strings) HasSuffix(s, suffix string) bool           { return strings.HasSuffix(s, suffix) }
func Tx.Close
Back

In /Users/kun/gobatis/gobatis/executor/tx.go:

31
func (t *Tx) Close() error {
32
        return nil
33
}
func _strings.HasPrefix
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

179
func (p _strings) HasPrefix(s, prefix string) bool           { return strings.HasPrefix(s, prefix) }
func errorListener.SyntaxError
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

177
func (p *errorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException) {
178
        throw("", nil, syntaxErr).format("词法分析错误")
179
}
func paramsStack.len
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

937
func (p *paramsStack) len() int {
938
        return p.list.Len()
939
}
func paramsStack.empty
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

941
func (p *paramsStack) empty() bool {
942
        return p.list.Len() == 0
943
}
func isError
Back

In /Users/kun/gobatis/gobatis/executor/utils.go:

56
func isError(t reflect.Type) bool {
57
        return t.Implements(reflect.TypeOf((*error)(nil)).Elem())
58
}
func _strings.Join
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

178
func (p _strings) Join(elems []string, sep string) string    { return strings.Join(elems, sep) }
func _strings.Fields
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

177
func (p _strings) Fields(s string) []string                  { return strings.Fields(s) }
func valueStack.empty
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

826
func (p *valueStack) empty() bool {
827
        return p.list.Len() == 0
828
}
func fragment.proxy
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

51
func (p *fragment) proxy(field reflect.Value) {
52
        field.Set(reflect.MakeFunc(field.Type(), func(args []reflect.Value) (results []reflect.Value) {
53
                return p.call(field.Type(), args...)
54
        }))
55
}
func _strings.Replace
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

192
func (p _strings) Replace(s, old, new string, n int) string  { return strings.Replace(s, old, new, n) }
func _strings.SplitAfter
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

176
func (p _strings) SplitAfter(s, sep string) []string         { return strings.SplitAfter(s, sep) }
func _strings.Split
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

175
func (p _strings) Split(s, sep string) []string              { return strings.Split(s, sep) }
func _strings.SplitAfterN
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

174
func (p _strings) SplitAfterN(s, sep string, n int) []string { return strings.SplitAfterN(s, sep, n) }
func _strings.SplitN
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

173
func (p _strings) SplitN(s, sep string, n int) []string      { return strings.SplitN(s, sep, n) }
func _strings.LastIndexAny
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

172
func (p _strings) LastIndexAny(s, chars string) int          { return strings.LastIndexAny(s, chars) }
func _strings.IndexAny
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

171
func (p _strings) IndexAny(s, chars string) int              { return strings.IndexAny(s, chars) }
func _strings.LastIndex
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

170
func (p _strings) LastIndex(s, substr string) int            { return strings.LastIndex(s, substr) }
func _strings.ContainsRune
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

169
func (p _strings) ContainsRune(s string, r rune) bool        { return strings.ContainsRune(s, r) }
func exprValue.int
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

660
func (p *exprValue) int() (v int, err error) {
661
        return cast.ToIntE(p.value)
662
}
func _strings.ContainsAny
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

168
func (p _strings) ContainsAny(s, chars string) bool          { return strings.ContainsAny(s, chars) }
func _strings.Contains
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

167
func (p _strings) Contains(s, substr string) bool            { return strings.Contains(s, substr) }
func _strings.Count
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

166
func (p _strings) Count(s, substr string) int                { return strings.Count(s, substr) }
func logger.Errorf
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

79
func (l logger) Errorf(format string, a ...any) {
80
        syslog.Printf(format, a...)
81
}
func exprValue.accept
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

649
func (p *exprValue) accept(received, expected reflect.Kind) bool {
650
        return expected == reflect.Interface || received == expected
651
}
func logger.Infof
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

75
func (l logger) Infof(format string, a ...any) {
76
        syslog.Printf(format, a...)
77
}
func fragment.parseWhere
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

244
func (p *fragment) parseWhere(parser *exprParser, node *xmlNode, res *psr) {
245
        p.trimPrefixOverrides(parser, node, res, dtd.WHERE, "AND |OR ")
246
}
func fragment.parseTrim
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

282
func (p *fragment) parseTrim(parser *exprParser, node *xmlNode, res *psr) {
283
        p.trimPrefixOverrides(parser, node, res, node.GetAttribute(dtd.PREFIX), node.GetAttribute(dtd.PREFIX_OVERRIDES))
284
}
func fragment.parseSet
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

301
func (p *fragment) parseSet(parser *exprParser, node *xmlNode, res *psr) {
302
        p.trimPrefixOverrides(parser, node, res, dtd.SET, ",")
303
}
func logger.brand
Back

In /Users/kun/gobatis/gobatis/executor/logger.go:

30
func (l logger) brand() string {
31
        return ""
32
}
func caller.removeParam
Back

In /Users/kun/gobatis/gobatis/executor/fragment.go:

406
func (p *caller) removeParam(a []reflect.Value, i int) []reflect.Value {
407
        return append(a[:i], a[i+1:]...)
408
}
func _strings.EqualFold
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

194
func (p _strings) EqualFold(s, t string) bool                { return strings.EqualFold(s, t) }
func _strings.Index
Back

In /Users/kun/gobatis/gobatis/executor/builtin.go:

195
func (p _strings) Index(s, substr string) int                { return strings.Index(s, substr) }
func parserErrorStrategy.Sync
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

158
func (p *parserErrorStrategy) Sync(recognizer antlr.Parser) {
159
        // pass
160
}
func parserErrorStrategy.ReportError
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

162
func (p *parserErrorStrategy) ReportError(antlr.Parser, antlr.RecognitionException) {
163
        // pass
164
}
func parserErrorStrategy.ReportMatch
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

166
func (p *parserErrorStrategy) ReportMatch(antlr.Parser) {
167
        // pass
168
}
func errorListener.ReportContextSensitivity
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

189
func (p *errorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet) {
190
        // pass
191
}
func errorListener.ReportAttemptingFullContext
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

185
func (p *errorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet) {
186
        // pass
187
}
func @20:8
Back

In /Users/kun/gobatis/gobatis/executor/parser.go:

20
func() {
21
                //e := recover()
22
                //err = castRecoverError(file, e)
23
        }
func errorListener.ReportAmbiguity
Back

In /Users/kun/gobatis/gobatis/executor/error.go:

181
func (p *errorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet) {
182
        // pass
183
}
Package Overview: github.com/gobatis/gobatis/parser/expr 43.4%

Please select a function to see what's left for testing.

ExprParser.Parameters(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 28/28
ExprParser.Operand(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 21/21
ExprParser.ParamDecl(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 18/18
NewExprLexer(...) github.com/gobatis/gobatis/parser/expr/expr_lexer.go 100.0% 15/15
NewExprParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 13/13
ExprParser.Expressions(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 10/10
ExprParser.Var_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 8/8
ExprParser.ParamComma(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 8/8
ExprParser.Literal(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 8/8
@368:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 6/6
NewPrimaryExprContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewLogicalContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewLiteralContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewParamTypeContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewIntegerContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewSlice_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewVar_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewExpressionContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewParamDeclContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewBasicLitContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewOperandContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewParamCommaContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewParametersContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewString_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
NewExpressionsContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 5/5
ParamDeclContext.ParamType(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 4/4
ParamCommaContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ParamTypeContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ExpressionsContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ExpressionsContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ParamTypeContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ExpressionContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
OperandContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ExpressionContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
OperandContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ParamCommaContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ParametersContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ParametersContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
Var_Context.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
PrimaryExprContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ParamDeclContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
ParamDeclContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
Var_Context.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
PrimaryExprContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 2/2
@1211:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@3264:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@598:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
OperandContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ParamDeclContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ParamTypeContext.IDENTIFIER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@2307:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@1725:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ParamTypeContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@1976:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ParamDeclContext.IDENTIFIER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
IntegerContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@2460:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@718:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExpressionContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
Var_Context.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
String_Context.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@493:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
Var_Context.IDENTIFIER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
LogicalContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
LiteralContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExpressionsContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
BasicLitContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
Slice_Context.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ParamCommaContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@2654:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@833:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExpressionContext.GetTertiary(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExpressionContext.GetRel_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExpressionContext.GetAdd_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@2172:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExpressionContext.GetMul_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExpressionContext.GetUnary_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@1857:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@364:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
PrimaryExprContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
@1558:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ParametersContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 1/1
ExprParser.Logical(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 92.3% 12/13
ExprParser.Integer(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 92.3% 12/13
ExprParser.String_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 92.3% 12/13
ExprParser.primaryExpr(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 83.3% 35/42
ExprParser.expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 80.9% 93/115
ExpressionContext.Logical(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 75.0% 3/4
ExprParser.ParamType(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 73.3% 11/15
ExprParser.Slice_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 68.4% 26/38
ExprParser.BasicLit(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 53.8% 14/26
Slice_Context.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
LogicalContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
IntegerContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
IntegerContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
BasicLitContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
Slice_Context.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
BasicLitContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
String_Context.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
LiteralContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
LiteralContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
LogicalContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
String_Context.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 50.0% 1/2
@1980:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@1215:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@2176:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@722:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@2658:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@2311:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@1729:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@2464:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@3268:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@1861:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@602:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@837:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@497:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
@1562:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 16.7% 1/6
ExprParser.ExpressionList(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/21
ExprParser.Call(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/20
ExprParser.Index(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/12
ExprParser.Member(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/10
ExprParser.Sempred(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/10
ExprParser.Misc(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/10
ExprParser.Nil_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/8
ExprParser.Float_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/8
ExprParser.Expression_Sempred(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/7
Slice_Context.AllExpression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
@936:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
ExpressionContext.AllExpression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
@2075:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
ParametersContext.AllParamComma(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
@3118:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
@2987:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
ExpressionListContext.AllExpression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
@2861:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
ParametersContext.AllParamDecl(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
@2562:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
@2756:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/6
NewExpressionListContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/5
NewIndexContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/5
NewNil_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/5
NewMemberContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/5
NewFloat_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/5
NewCallContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/5
NewMiscContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/5
CallContext.ExpressionList(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyParamTypeContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
BasicLitContext.Nil_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
IndexContext.Expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyLogicalContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
PrimaryExprContext.Operand(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
BasicLitContext.String_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyBasicLitContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyExpressionListContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
PrimaryExprContext.PrimaryExpr(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyIntegerContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyMiscContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyExpressionContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
ExpressionListContext.Expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
ExpressionsContext.Expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
LiteralContext.BasicLit(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
BasicLitContext.Float_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyExpressionsContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyCallContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
PrimaryExprContext.Member(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
PrimaryExprContext.Slice_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyOperandContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyPrimaryExprContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyIndexContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyLiteralContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
OperandContext.Literal(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
OperandContext.Var_(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
BasicLitContext.Integer(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
OperandContext.Expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyFloat_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptySlice_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
PrimaryExprContext.Index(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
ExpressionContext.PrimaryExpr(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
Slice_Context.Expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyParamDeclContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyParamCommaContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
ParametersContext.ParamComma(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyVar_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyMemberContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
ExpressionContext.Expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
ParametersContext.ParamDecl(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyString_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
PrimaryExprContext.Call(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyNil_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
NewEmptyParametersContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/4
ExprParser.PrimaryExpr_Sempred(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/3
IndexContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
Nil_Context.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
CallContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
CallContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
ExpressionListContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
ExpressionListContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
IndexContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
MiscContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
MiscContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
Float_Context.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
Float_Context.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
MemberContext.EnterRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
MemberContext.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
Nil_Context.ExitRule(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/2
IndexContext.R_BRACKET(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.LOGICAL_AND(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
OperandContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParametersContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParametersContext.EOF(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MiscContext.WS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.LOGICAL_OR_UPPER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LiteralContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.LOGICAL_AND_UPPER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.LOGICAL_OR_LOWER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.LOGICAL_AND_LOWER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.LOGICAL_OR(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MiscContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LogicalContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParametersContext.STAR(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParametersContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
BasicLitContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExprParser.PrimaryExpr(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
PrimaryExprContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
PrimaryExprContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamCommaContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
BasicLitContext.IMAGINARY_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
BasicLitContext.RUNE_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExprParser.Expression(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
BasicLitContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.QUESTION(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.COLON(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.GREATER_OR_EQUALS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.GREATER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.LESS_OR_EQUALS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamCommaContext.COMMA(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.LESS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.DECIMAL_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.BINARY_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.OCTAL_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.HEX_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.IMAGINARY_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.RUNE_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.NOT_EQUALS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IntegerContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.EQUALS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.OR(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.BIT_CLEAR(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.AMPERSAND(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.RSHIFT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.LSHIFT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Slice_Context.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.MOD(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Nil_Context.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Nil_Context.NIL_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Nil_Context.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Nil_Context.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
@2071:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
OperandContext.R_PAREN(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamCommaContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
@2558:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.STAR(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.CARET(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamDeclContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.EXCLAMATION(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
String_Context.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
String_Context.RAW_STRING_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
String_Context.INTERPRETED_STRING_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.MINUS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
String_Context.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.PLUS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.SetTertiary(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.SetRel_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.SetAdd_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.SetMul_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.SetUnary_op(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Slice_Context.COLON(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Float_Context.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Float_Context.FLOAT_LIT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Float_Context.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Float_Context.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MemberContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MemberContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Slice_Context.AllCOLON(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
@2752:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
@932:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MemberContext.IDENTIFIER(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Slice_Context.R_BRACKET(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MemberContext.DOT(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IndexContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IndexContext.L_BRACKET(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MiscContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Var_Context.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IndexContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
IndexContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MiscContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MemberContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
MiscContext.TERMINATOR(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
@2857:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
LiteralContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
OperandContext.L_PAREN(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionContext.DIV(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Slice_Context.L_BRACKET(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionListContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionsContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionsContext.EOF(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionListContext.AllCOMMA(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionListContext.COMMA(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionListContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionListContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
OperandContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Slice_Context.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionsContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
@2983:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamDeclContext.COLON(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamTypeContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamDeclContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamTypeContext.R_BRACKET(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
CallContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
CallContext.L_PAREN(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
CallContext.R_PAREN(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamTypeContext.L_BRACKET(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
CallContext.ELLIPSIS(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
CallContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
CallContext.ToStringTree(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
@3114:8(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
Var_Context.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ParamTypeContext.GetParser(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 0.0% 0/1
ExpressionsContext.IsExpressionsContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
MemberContext.IsMemberContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
BaseExprParserListener.ExitParamType(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
Slice_Context.IsSlice_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
BaseExprParserListener.EnterExpressions(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
Var_Context.IsVar_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
MiscContext.IsMiscContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
IndexContext.IsIndexContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
ExpressionContext.IsExpressionContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
Float_Context.IsFloat_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
BaseExprParserListener.EnterMisc(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
ParamDeclContext.IsParamDeclContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
ExpressionListContext.IsExpressionListContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
Nil_Context.IsNil_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
IntegerContext.IsIntegerContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
PrimaryExprContext.IsPrimaryExprContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
ParamCommaContext.IsParamCommaContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
LogicalContext.IsLogicalContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
BasicLitContext.IsBasicLitContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
OperandContext.IsOperandContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
LiteralContext.IsLiteralContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
ParametersContext.IsParametersContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
BaseExprParserListener.VisitTerminal(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.VisitErrorNode(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterEveryRule(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitEveryRule(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterParameters(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitParameters(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterParamComma(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitExpressions(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterParamDecl(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitParamDecl(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterParamType(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
CallContext.IsCallContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
BaseExprParserListener.ExitParamComma(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
ParamTypeContext.IsParamTypeContext(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
String_Context.IsString_Context(...) github.com/gobatis/gobatis/parser/expr/expr_parser.go 100.0% 0/0
BaseExprParserListener.ExitMisc(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterExpression(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitExpression(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterPrimaryExpr(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitPrimaryExpr(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterLogical(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitLogical(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterOperand(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitOperand(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterVar_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitVar_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterMember(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitMember(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterLiteral(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitLiteral(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterBasicLit(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitBasicLit(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterInteger(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitInteger(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterNil_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitNil_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterString_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitString_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterFloat_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitFloat_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterIndex(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitIndex(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterExpressionList(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitExpressionList(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterCall(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitCall(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.EnterSlice_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
BaseExprParserListener.ExitSlice_(...) github.com/gobatis/gobatis/parser/expr/exprparser_base_listener.go 100.0% 0/0
func ExprParser.Parameters
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

360
func (p *ExprParser) Parameters() (localctx IParametersContext) {
361
        localctx = NewParametersContext(p, p.GetParserRuleContext(), p.GetState())
362
        p.EnterRule(localctx, 0, ExprParserRULE_parameters)
363
364
        defer func() {
365
                p.ExitRule()
366
        }()
367
368
        defer func() {
369
                if err := recover(); err != nil {
370
                        if v, ok := err.(antlr.RecognitionException); ok {
371
                                localctx.SetException(v)
372
                                p.GetErrorHandler().ReportError(p, v)
373
                                p.GetErrorHandler().Recover(p, v)
374
                        } else {
375
                                panic(err)
376
                        }
377
                }
378
        }()
379
380
        var _alt int
381
382
        p.EnterOuterAlt(localctx, 1)
383
        p.SetState(54)
384
        p.GetErrorHandler().Sync(p)
385
        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) {
386
        case 1:
387
                {
388
                        p.SetState(44)
389
                        p.Match(ExprParserSTAR)
390
                }
391
392
        case 2:
393
                {
394
                        p.SetState(45)
395
                        p.ParamDecl()
396
                }
397
                p.SetState(51)
398
                p.GetErrorHandler().Sync(p)
399
                _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext())
400
401
                for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
402
                        if _alt == 1 {
403
                                {
404
                                        p.SetState(46)
405
                                        p.ParamComma()
406
                                }
407
                                {
408
                                        p.SetState(47)
409
                                        p.ParamDecl()
410
                                }
411
412
                        }
413
                        p.SetState(53)
414
                        p.GetErrorHandler().Sync(p)
415
                        _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext())
416
                }
417
418
        }
419
        {
420
                p.SetState(56)
421
                p.Match(ExprParserEOF)
422
        }
423
424
        return localctx
425
}
func ExprParser.Operand
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1853
func (p *ExprParser) Operand() (localctx IOperandContext) {
1854
        localctx = NewOperandContext(p, p.GetParserRuleContext(), p.GetState())
1855
        p.EnterRule(localctx, 18, ExprParserRULE_operand)
1856
1857
        defer func() {
1858
                p.ExitRule()
1859
        }()
1860
1861
        defer func() {
1862
                if err := recover(); err != nil {
1863
                        if v, ok := err.(antlr.RecognitionException); ok {
1864
                                localctx.SetException(v)
1865
                                p.GetErrorHandler().ReportError(p, v)
1866
                                p.GetErrorHandler().Recover(p, v)
1867
                        } else {
1868
                                panic(err)
1869
                        }
1870
                }
1871
        }()
1872
1873
        p.SetState(131)
1874
        p.GetErrorHandler().Sync(p)
1875
        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext()) {
1876
        case 1:
1877
                p.EnterOuterAlt(localctx, 1)
1878
                {
1879
                        p.SetState(125)
1880
                        p.Literal()
1881
                }
1882
1883
        case 2:
1884
                p.EnterOuterAlt(localctx, 2)
1885
                {
1886
                        p.SetState(126)
1887
                        p.Var_()
1888
                }
1889
1890
        case 3:
1891
                p.EnterOuterAlt(localctx, 3)
1892
                {
1893
                        p.SetState(127)
1894
                        p.Match(ExprParserL_PAREN)
1895
                }
1896
                {
1897
                        p.SetState(128)
1898
                        p.expression(0)
1899
                }
1900
                {
1901
                        p.SetState(129)
1902
                        p.Match(ExprParserR_PAREN)
1903
                }
1904
1905
        }
1906
1907
        return localctx
1908
}
func ExprParser.ParamDecl
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

594
func (p *ExprParser) ParamDecl() (localctx IParamDeclContext) {
595
        localctx = NewParamDeclContext(p, p.GetParserRuleContext(), p.GetState())
596
        p.EnterRule(localctx, 4, ExprParserRULE_paramDecl)
597
598
        defer func() {
599
                p.ExitRule()
600
        }()
601
602
        defer func() {
603
                if err := recover(); err != nil {
604
                        if v, ok := err.(antlr.RecognitionException); ok {
605
                                localctx.SetException(v)
606
                                p.GetErrorHandler().ReportError(p, v)
607
                                p.GetErrorHandler().Recover(p, v)
608
                        } else {
609
                                panic(err)
610
                        }
611
                }
612
        }()
613
614
        p.SetState(64)
615
        p.GetErrorHandler().Sync(p)
616
        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 2, p.GetParserRuleContext()) {
617
        case 1:
618
                p.EnterOuterAlt(localctx, 1)
619
                {
620
                        p.SetState(60)
621
                        p.Match(ExprParserIDENTIFIER)
622
                }
623
624
        case 2:
625
                p.EnterOuterAlt(localctx, 2)
626
                {
627
                        p.SetState(61)
628
                        p.Match(ExprParserIDENTIFIER)
629
                }
630
                {
631
                        p.SetState(62)
632
                        p.Match(ExprParserCOLON)
633
                }
634
                {
635
                        p.SetState(63)
636
                        p.ParamType()
637
                }
638
639
        }
640
641
        return localctx
642
}
func NewExprLexer
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_lexer.go:

476
func NewExprLexer(input antlr.CharStream) *ExprLexer {
477
        l := new(ExprLexer)
478
        lexerDeserializer := antlr.NewATNDeserializer(nil)
479
        lexerAtn := lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn)
480
        lexerDecisionToDFA := make([]*antlr.DFA, len(lexerAtn.DecisionToState))
481
        for index, ds := range lexerAtn.DecisionToState {
482
                lexerDecisionToDFA[index] = antlr.NewDFA(ds, index)
483
        }
484
        l.BaseLexer = antlr.NewBaseLexer(input)
485
        l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache())
486
487
        l.channelNames = lexerChannelNames
488
        l.modeNames = lexerModeNames
489
        l.RuleNames = lexerRuleNames
490
        l.LiteralNames = lexerLiteralNames
491
        l.SymbolicNames = lexerSymbolicNames
492
        l.GrammarFileName = "ExprLexer.g4"
493
        // TODO: l.EOF = antlr.TokenEOF
494
495
        return l
496
}
func NewExprParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

141
func NewExprParser(input antlr.TokenStream) *ExprParser {
142
        this := new(ExprParser)
143
        deserializer := antlr.NewATNDeserializer(nil)
144
        deserializedATN := deserializer.DeserializeFromUInt16(parserATN)
145
        decisionToDFA := make([]*antlr.DFA, len(deserializedATN.DecisionToState))
146
        for index, ds := range deserializedATN.DecisionToState {
147
                decisionToDFA[index] = antlr.NewDFA(ds, index)
148
        }
149
        this.BaseParser = antlr.NewBaseParser(input)
150
151
        this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache())
152
        this.RuleNames = ruleNames
153
        this.LiteralNames = literalNames
154
        this.SymbolicNames = symbolicNames
155
        this.GrammarFileName = "ExprParser.g4"
156
157
        return this
158
}
func ExprParser.Expressions
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

829
func (p *ExprParser) Expressions() (localctx IExpressionsContext) {
830
        localctx = NewExpressionsContext(p, p.GetParserRuleContext(), p.GetState())
831
        p.EnterRule(localctx, 8, ExprParserRULE_expressions)
832
833
        defer func() {
834
                p.ExitRule()
835
        }()
836
837
        defer func() {
838
                if err := recover(); err != nil {
839
                        if v, ok := err.(antlr.RecognitionException); ok {
840
                                localctx.SetException(v)
841
                                p.GetErrorHandler().ReportError(p, v)
842
                                p.GetErrorHandler().Recover(p, v)
843
                        } else {
844
                                panic(err)
845
                        }
846
                }
847
        }()
848
849
        p.EnterOuterAlt(localctx, 1)
850
        {
851
                p.SetState(72)
852
                p.expression(0)
853
        }
854
        {
855
                p.SetState(73)
856
                p.Match(ExprParserEOF)
857
        }
858
859
        return localctx
860
}
func ExprParser.Var_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1972
func (p *ExprParser) Var_() (localctx IVar_Context) {
1973
        localctx = NewVar_Context(p, p.GetParserRuleContext(), p.GetState())
1974
        p.EnterRule(localctx, 20, ExprParserRULE_var_)
1975
1976
        defer func() {
1977
                p.ExitRule()
1978
        }()
1979
1980
        defer func() {
1981
                if err := recover(); err != nil {
1982
                        if v, ok := err.(antlr.RecognitionException); ok {
1983
                                localctx.SetException(v)
1984
                                p.GetErrorHandler().ReportError(p, v)
1985
                                p.GetErrorHandler().Recover(p, v)
1986
                        } else {
1987
                                panic(err)
1988
                        }
1989
                }
1990
        }()
1991
1992
        p.EnterOuterAlt(localctx, 1)
1993
        {
1994
                p.SetState(133)
1995
                p.Match(ExprParserIDENTIFIER)
1996
        }
1997
1998
        return localctx
1999
}
func ExprParser.ParamComma
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

489
func (p *ExprParser) ParamComma() (localctx IParamCommaContext) {
490
        localctx = NewParamCommaContext(p, p.GetParserRuleContext(), p.GetState())
491
        p.EnterRule(localctx, 2, ExprParserRULE_paramComma)
492
493
        defer func() {
494
                p.ExitRule()
495
        }()
496
497
        defer func() {
498
                if err := recover(); err != nil {
499
                        if v, ok := err.(antlr.RecognitionException); ok {
500
                                localctx.SetException(v)
501
                                p.GetErrorHandler().ReportError(p, v)
502
                                p.GetErrorHandler().Recover(p, v)
503
                        } else {
504
                                panic(err)
505
                        }
506
                }
507
        }()
508
509
        p.EnterOuterAlt(localctx, 1)
510
        {
511
                p.SetState(58)
512
                p.Match(ExprParserCOMMA)
513
        }
514
515
        return localctx
516
}
func ExprParser.Literal
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2168
func (p *ExprParser) Literal() (localctx ILiteralContext) {
2169
        localctx = NewLiteralContext(p, p.GetParserRuleContext(), p.GetState())
2170
        p.EnterRule(localctx, 24, ExprParserRULE_literal)
2171
2172
        defer func() {
2173
                p.ExitRule()
2174
        }()
2175
2176
        defer func() {
2177
                if err := recover(); err != nil {
2178
                        if v, ok := err.(antlr.RecognitionException); ok {
2179
                                localctx.SetException(v)
2180
                                p.GetErrorHandler().ReportError(p, v)
2181
                                p.GetErrorHandler().Recover(p, v)
2182
                        } else {
2183
                                panic(err)
2184
                        }
2185
                }
2186
        }()
2187
2188
        p.EnterOuterAlt(localctx, 1)
2189
        {
2190
                p.SetState(138)
2191
                p.BasicLit()
2192
        }
2193
2194
        return localctx
2195
}
func @368:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

368
func() {
369
                if err := recover(); err != nil {
370
                        if v, ok := err.(antlr.RecognitionException); ok {
371
                                localctx.SetException(v)
372
                                p.GetErrorHandler().ReportError(p, v)
373
                                p.GetErrorHandler().Recover(p, v)
374
                        } else {
375
                                panic(err)
376
                        }
377
                }
378
        }
func NewPrimaryExprContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1452
func NewPrimaryExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrimaryExprContext {
1453
        var p = new(PrimaryExprContext)
1454
1455
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
1456
1457
        p.parser = parser
1458
        p.RuleIndex = ExprParserRULE_primaryExpr
1459
1460
        return p
1461
}
func NewLogicalContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1663
func NewLogicalContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LogicalContext {
1664
        var p = new(LogicalContext)
1665
1666
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
1667
1668
        p.parser = parser
1669
        p.RuleIndex = ExprParserRULE_logical
1670
1671
        return p
1672
}
func NewLiteralContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2125
func NewLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LiteralContext {
2126
        var p = new(LiteralContext)
2127
2128
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2129
2130
        p.parser = parser
2131
        p.RuleIndex = ExprParserRULE_literal
2132
2133
        return p
2134
}
func NewParamTypeContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

669
func NewParamTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamTypeContext {
670
        var p = new(ParamTypeContext)
671
672
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
673
674
        p.parser = parser
675
        p.RuleIndex = ExprParserRULE_paramType
676
677
        return p
678
}
func NewIntegerContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2398
func NewIntegerContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IntegerContext {
2399
        var p = new(IntegerContext)
2400
2401
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2402
2403
        p.parser = parser
2404
        p.RuleIndex = ExprParserRULE_integer
2405
2406
        return p
2407
}
func NewSlice_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3188
func NewSlice_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Slice_Context {
3189
        var p = new(Slice_Context)
3190
3191
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
3192
3193
        p.parser = parser
3194
        p.RuleIndex = ExprParserRULE_slice_
3195
3196
        return p
3197
}
func NewVar_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1935
func NewVar_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Var_Context {
1936
        var p = new(Var_Context)
1937
1938
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
1939
1940
        p.parser = parser
1941
        p.RuleIndex = ExprParserRULE_var_
1942
1943
        return p
1944
}
func NewExpressionContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1021
func NewExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionContext {
1022
        var p = new(ExpressionContext)
1023
1024
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
1025
1026
        p.parser = parser
1027
        p.RuleIndex = ExprParserRULE_expression
1028
1029
        return p
1030
}
func NewParamDeclContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

543
func NewParamDeclContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamDeclContext {
544
        var p = new(ParamDeclContext)
545
546
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
547
548
        p.parser = parser
549
        p.RuleIndex = ExprParserRULE_paramDecl
550
551
        return p
552
}
func NewBasicLitContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2222
func NewBasicLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BasicLitContext {
2223
        var p = new(BasicLitContext)
2224
2225
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2226
2227
        p.parser = parser
2228
        p.RuleIndex = ExprParserRULE_basicLit
2229
2230
        return p
2231
}
func NewOperandContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1782
func NewOperandContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OperandContext {
1783
        var p = new(OperandContext)
1784
1785
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
1786
1787
        p.parser = parser
1788
        p.RuleIndex = ExprParserRULE_operand
1789
1790
        return p
1791
}
func NewParamCommaContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

452
func NewParamCommaContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamCommaContext {
453
        var p = new(ParamCommaContext)
454
455
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
456
457
        p.parser = parser
458
        p.RuleIndex = ExprParserRULE_paramComma
459
460
        return p
461
}
func NewParametersContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

273
func NewParametersContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParametersContext {
274
        var p = new(ParametersContext)
275
276
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
277
278
        p.parser = parser
279
        p.RuleIndex = ExprParserRULE_parameters
280
281
        return p
282
}
func NewString_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2608
func NewString_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *String_Context {
2609
        var p = new(String_Context)
2610
2611
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2612
2613
        p.parser = parser
2614
        p.RuleIndex = ExprParserRULE_string_
2615
2616
        return p
2617
}
func NewExpressionsContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

782
func NewExpressionsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionsContext {
783
        var p = new(ExpressionsContext)
784
785
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
786
787
        p.parser = parser
788
        p.RuleIndex = ExprParserRULE_expressions
789
790
        return p
791
}
func ParamDeclContext.ParamType
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

564
func (s *ParamDeclContext) ParamType() IParamTypeContext {
565
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamTypeContext)(nil)).Elem(), 0)
566
567
        if t == nil {
568
                return nil
569
        }
570
571
        return t.(IParamTypeContext)
572
}
func ParamCommaContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

483
func (s *ParamCommaContext) ExitRule(listener antlr.ParseTreeListener) {
484
        if listenerT, ok := listener.(ExprParserListener); ok {
485
                listenerT.ExitParamComma(s)
486
        }
487
}
func ParamTypeContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

702
func (s *ParamTypeContext) EnterRule(listener antlr.ParseTreeListener) {
703
        if listenerT, ok := listener.(ExprParserListener); ok {
704
                listenerT.EnterParamType(s)
705
        }
706
}
func ExpressionsContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

817
func (s *ExpressionsContext) EnterRule(listener antlr.ParseTreeListener) {
818
        if listenerT, ok := listener.(ExprParserListener); ok {
819
                listenerT.EnterExpressions(s)
820
        }
821
}
func ExpressionsContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

823
func (s *ExpressionsContext) ExitRule(listener antlr.ParseTreeListener) {
824
        if listenerT, ok := listener.(ExprParserListener); ok {
825
                listenerT.ExitExpressions(s)
826
        }
827
}
func ParamTypeContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

708
func (s *ParamTypeContext) ExitRule(listener antlr.ParseTreeListener) {
709
        if listenerT, ok := listener.(ExprParserListener); ok {
710
                listenerT.ExitParamType(s)
711
        }
712
}
func ExpressionContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1185
func (s *ExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
1186
        if listenerT, ok := listener.(ExprParserListener); ok {
1187
                listenerT.EnterExpression(s)
1188
        }
1189
}
func OperandContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1847
func (s *OperandContext) ExitRule(listener antlr.ParseTreeListener) {
1848
        if listenerT, ok := listener.(ExprParserListener); ok {
1849
                listenerT.ExitOperand(s)
1850
        }
1851
}
func ExpressionContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1191
func (s *ExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
1192
        if listenerT, ok := listener.(ExprParserListener); ok {
1193
                listenerT.ExitExpression(s)
1194
        }
1195
}
func OperandContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1841
func (s *OperandContext) EnterRule(listener antlr.ParseTreeListener) {
1842
        if listenerT, ok := listener.(ExprParserListener); ok {
1843
                listenerT.EnterOperand(s)
1844
        }
1845
}
func ParamCommaContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

477
func (s *ParamCommaContext) EnterRule(listener antlr.ParseTreeListener) {
478
        if listenerT, ok := listener.(ExprParserListener); ok {
479
                listenerT.EnterParamComma(s)
480
        }
481
}
func ParametersContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

354
func (s *ParametersContext) ExitRule(listener antlr.ParseTreeListener) {
355
        if listenerT, ok := listener.(ExprParserListener); ok {
356
                listenerT.ExitParameters(s)
357
        }
358
}
func ParametersContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

348
func (s *ParametersContext) EnterRule(listener antlr.ParseTreeListener) {
349
        if listenerT, ok := listener.(ExprParserListener); ok {
350
                listenerT.EnterParameters(s)
351
        }
352
}
func Var_Context.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1960
func (s *Var_Context) EnterRule(listener antlr.ParseTreeListener) {
1961
        if listenerT, ok := listener.(ExprParserListener); ok {
1962
                listenerT.EnterVar_(s)
1963
        }
1964
}
func PrimaryExprContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1539
func (s *PrimaryExprContext) ExitRule(listener antlr.ParseTreeListener) {
1540
        if listenerT, ok := listener.(ExprParserListener); ok {
1541
                listenerT.ExitPrimaryExpr(s)
1542
        }
1543
}
func ParamDeclContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

582
func (s *ParamDeclContext) EnterRule(listener antlr.ParseTreeListener) {
583
        if listenerT, ok := listener.(ExprParserListener); ok {
584
                listenerT.EnterParamDecl(s)
585
        }
586
}
func ParamDeclContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

588
func (s *ParamDeclContext) ExitRule(listener antlr.ParseTreeListener) {
589
        if listenerT, ok := listener.(ExprParserListener); ok {
590
                listenerT.ExitParamDecl(s)
591
        }
592
}
func Var_Context.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1966
func (s *Var_Context) ExitRule(listener antlr.ParseTreeListener) {
1967
        if listenerT, ok := listener.(ExprParserListener); ok {
1968
                listenerT.ExitVar_(s)
1969
        }
1970
}
func PrimaryExprContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1533
func (s *PrimaryExprContext) EnterRule(listener antlr.ParseTreeListener) {
1534
        if listenerT, ok := listener.(ExprParserListener); ok {
1535
                listenerT.EnterPrimaryExpr(s)
1536
        }
1537
}
func @1211:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1211
func() {
1212
                p.UnrollRecursionContexts(_parentctx)
1213
        }
func @3264:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3264
func() {
3265
                p.ExitRule()
3266
        }
func @598:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

598
func() {
599
                p.ExitRule()
600
        }
func OperandContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1833
func (s *OperandContext) GetRuleContext() antlr.RuleContext {
1834
        return s
1835
}
func ParamDeclContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

574
func (s *ParamDeclContext) GetRuleContext() antlr.RuleContext {
575
        return s
576
}
func ParamTypeContext.IDENTIFIER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

682
func (s *ParamTypeContext) IDENTIFIER() antlr.TerminalNode {
683
        return s.GetToken(ExprParserIDENTIFIER, 0)
684
}
func @2307:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2307
func() {
2308
                p.ExitRule()
2309
        }
func @1725:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1725
func() {
1726
                p.ExitRule()
1727
        }
func ParamTypeContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

694
func (s *ParamTypeContext) GetRuleContext() antlr.RuleContext {
695
        return s
696
}
func @1976:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1976
func() {
1977
                p.ExitRule()
1978
        }
func ParamDeclContext.IDENTIFIER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

556
func (s *ParamDeclContext) IDENTIFIER() antlr.TerminalNode {
557
        return s.GetToken(ExprParserIDENTIFIER, 0)
558
}
func IntegerContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2435
func (s *IntegerContext) GetRuleContext() antlr.RuleContext {
2436
        return s
2437
}
func @2460:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2460
func() {
2461
                p.ExitRule()
2462
        }
func @718:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

718
func() {
719
                p.ExitRule()
720
        }
func ExpressionContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1177
func (s *ExpressionContext) GetRuleContext() antlr.RuleContext {
1178
        return s
1179
}
func Var_Context.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1952
func (s *Var_Context) GetRuleContext() antlr.RuleContext {
1953
        return s
1954
}
func String_Context.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2629
func (s *String_Context) GetRuleContext() antlr.RuleContext {
2630
        return s
2631
}
func @493:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

493
func() {
494
                p.ExitRule()
495
        }
func Var_Context.IDENTIFIER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1948
func (s *Var_Context) IDENTIFIER() antlr.TerminalNode {
1949
        return s.GetToken(ExprParserIDENTIFIER, 0)
1950
}
func LogicalContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1700
func (s *LogicalContext) GetRuleContext() antlr.RuleContext {
1701
        return s
1702
}
func LiteralContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2148
func (s *LiteralContext) GetRuleContext() antlr.RuleContext {
2149
        return s
2150
}
func ExpressionsContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

809
func (s *ExpressionsContext) GetRuleContext() antlr.RuleContext {
810
        return s
811
}
func BasicLitContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2283
func (s *BasicLitContext) GetRuleContext() antlr.RuleContext {
2284
        return s
2285
}
func Slice_Context.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3240
func (s *Slice_Context) GetRuleContext() antlr.RuleContext {
3241
        return s
3242
}
func ParamCommaContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

469
func (s *ParamCommaContext) GetRuleContext() antlr.RuleContext {
470
        return s
471
}
func @2654:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2654
func() {
2655
                p.ExitRule()
2656
        }
func @833:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

833
func() {
834
                p.ExitRule()
835
        }
func ExpressionContext.GetTertiary
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1042
func (s *ExpressionContext) GetTertiary() antlr.Token { return s.tertiary }
func ExpressionContext.GetRel_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1040
func (s *ExpressionContext) GetRel_op() antlr.Token { return s.rel_op }
func ExpressionContext.GetAdd_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1038
func (s *ExpressionContext) GetAdd_op() antlr.Token { return s.add_op }
func @2172:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2172
func() {
2173
                p.ExitRule()
2174
        }
func ExpressionContext.GetMul_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1036
func (s *ExpressionContext) GetMul_op() antlr.Token { return s.mul_op }
func ExpressionContext.GetUnary_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1034
func (s *ExpressionContext) GetUnary_op() antlr.Token { return s.unary_op }
func @1857:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1857
func() {
1858
                p.ExitRule()
1859
        }
func @364:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

364
func() {
365
                p.ExitRule()
366
        }
func PrimaryExprContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1525
func (s *PrimaryExprContext) GetRuleContext() antlr.RuleContext {
1526
        return s
1527
}
func @1558:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1558
func() {
1559
                p.UnrollRecursionContexts(_parentctx)
1560
        }
func ParametersContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

340
func (s *ParametersContext) GetRuleContext() antlr.RuleContext {
341
        return s
342
}
func ExprParser.Logical
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1720
func (p *ExprParser) Logical() (localctx ILogicalContext) {
1721
        localctx = NewLogicalContext(p, p.GetParserRuleContext(), p.GetState())
1722
        p.EnterRule(localctx, 16, ExprParserRULE_logical)
1723
        var _la int
1724
1725
        defer func() {
1726
                p.ExitRule()
1727
        }()
1728
1729
        defer func() {
1730
                if err := recover(); err != nil {
1731
                        if v, ok := err.(antlr.RecognitionException); ok {
1732
                                localctx.SetException(v)
1733
                                p.GetErrorHandler().ReportError(p, v)
1734
                                p.GetErrorHandler().Recover(p, v)
1735
                        } else {
1736
                                panic(err)
1737
                        }
1738
                }
1739
        }()
1740
1741
        p.EnterOuterAlt(localctx, 1)
1742
        {
1743
                p.SetState(123)
1744
                _la = p.GetTokenStream().LA(1)
1745
1746
                if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<ExprParserLOGICAL_OR)|(1<<ExprParserLOGICAL_AND)|(1<<ExprParserLOGICAL_AND_LOWER)|(1<<ExprParserLOGICAL_OR_LOWER)|(1<<ExprParserLOGICAL_AND_UPPER)|(1<<ExprParserLOGICAL_OR_UPPER))) != 0) {
1747
                        p.GetErrorHandler().RecoverInline(p)
1748
                } else {
1749
                        p.GetErrorHandler().ReportMatch(p)
1750
                        p.Consume()
1751
                }
1752
        }
1753
1754
        return localctx
1755
}
func ExprParser.Integer
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2455
func (p *ExprParser) Integer() (localctx IIntegerContext) {
2456
        localctx = NewIntegerContext(p, p.GetParserRuleContext(), p.GetState())
2457
        p.EnterRule(localctx, 28, ExprParserRULE_integer)
2458
        var _la int
2459
2460
        defer func() {
2461
                p.ExitRule()
2462
        }()
2463
2464
        defer func() {
2465
                if err := recover(); err != nil {
2466
                        if v, ok := err.(antlr.RecognitionException); ok {
2467
                                localctx.SetException(v)
2468
                                p.GetErrorHandler().ReportError(p, v)
2469
                                p.GetErrorHandler().Recover(p, v)
2470
                        } else {
2471
                                panic(err)
2472
                        }
2473
                }
2474
        }()
2475
2476
        p.EnterOuterAlt(localctx, 1)
2477
        {
2478
                p.SetState(148)
2479
                _la = p.GetTokenStream().LA(1)
2480
2481
                if !(((_la-40)&-(0x1f+1)) == 0 && ((1<<uint((_la-40)))&((1<<(ExprParserDECIMAL_LIT-40))|(1<<(ExprParserBINARY_LIT-40))|(1<<(ExprParserOCTAL_LIT-40))|(1<<(ExprParserHEX_LIT-40))|(1<<(ExprParserIMAGINARY_LIT-40))|(1<<(ExprParserRUNE_LIT-40)))) != 0) {
2482
                        p.GetErrorHandler().RecoverInline(p)
2483
                } else {
2484
                        p.GetErrorHandler().ReportMatch(p)
2485
                        p.Consume()
2486
                }
2487
        }
2488
2489
        return localctx
2490
}
func ExprParser.String_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2649
func (p *ExprParser) String_() (localctx IString_Context) {
2650
        localctx = NewString_Context(p, p.GetParserRuleContext(), p.GetState())
2651
        p.EnterRule(localctx, 32, ExprParserRULE_string_)
2652
        var _la int
2653
2654
        defer func() {
2655
                p.ExitRule()
2656
        }()
2657
2658
        defer func() {
2659
                if err := recover(); err != nil {
2660
                        if v, ok := err.(antlr.RecognitionException); ok {
2661
                                localctx.SetException(v)
2662
                                p.GetErrorHandler().ReportError(p, v)
2663
                                p.GetErrorHandler().Recover(p, v)
2664
                        } else {
2665
                                panic(err)
2666
                        }
2667
                }
2668
        }()
2669
2670
        p.EnterOuterAlt(localctx, 1)
2671
        {
2672
                p.SetState(152)
2673
                _la = p.GetTokenStream().LA(1)
2674
2675
                if !(_la == ExprParserRAW_STRING_LIT || _la == ExprParserINTERPRETED_STRING_LIT) {
2676
                        p.GetErrorHandler().RecoverInline(p)
2677
                } else {
2678
                        p.GetErrorHandler().ReportMatch(p)
2679
                        p.Consume()
2680
                }
2681
        }
2682
2683
        return localctx
2684
}
func ExprParser.primaryExpr
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1549
func (p *ExprParser) primaryExpr(_p int) (localctx IPrimaryExprContext) {
1550
        var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
1551
        _parentState := p.GetState()
1552
        localctx = NewPrimaryExprContext(p, p.GetParserRuleContext(), _parentState)
1553
        var _prevctx IPrimaryExprContext = localctx
1554
        var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
1555
        _startState := 14
1556
        p.EnterRecursionRule(localctx, 14, ExprParserRULE_primaryExpr, _p)
1557
1558
        defer func() {
1559
                p.UnrollRecursionContexts(_parentctx)
1560
        }()
1561
1562
        defer func() {
1563
                if err := recover(); err != nil {
1564
                        if v, ok := err.(antlr.RecognitionException); ok {
1565
                                localctx.SetException(v)
1566
                                p.GetErrorHandler().ReportError(p, v)
1567
                                p.GetErrorHandler().Recover(p, v)
1568
                        } else {
1569
                                panic(err)
1570
                        }
1571
                }
1572
        }()
1573
1574
        var _alt int
1575
1576
        p.EnterOuterAlt(localctx, 1)
1577
        {
1578
                p.SetState(109)
1579
                p.Operand()
1580
        }
1581
1582
        p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
1583
        p.SetState(120)
1584
        p.GetErrorHandler().Sync(p)
1585
        _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext())
1586
1587
        for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
1588
                if _alt == 1 {
1589
                        if p.GetParseListeners() != nil {
1590
                                p.TriggerExitRuleEvent()
1591
                        }
1592
                        _prevctx = localctx
1593
                        localctx = NewPrimaryExprContext(p, _parentctx, _parentState)
1594
                        p.PushNewRecursionContext(localctx, _startState, ExprParserRULE_primaryExpr)
1595
                        p.SetState(111)
1596
1597
                        if !(p.Precpred(p.GetParserRuleContext(), 1)) {
1598
                                panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", ""))
1599
                        }
1600
                        p.SetState(116)
1601
                        p.GetErrorHandler().Sync(p)
1602
                        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 7, p.GetParserRuleContext()) {
1603
                        case 1:
1604
                                {
1605
                                        p.SetState(112)
1606
                                        p.Member()
1607
                                }
1608
1609
                        case 2:
1610
                                {
1611
                                        p.SetState(113)
1612
                                        p.Index()
1613
                                }
1614
1615
                        case 3:
1616
                                {
1617
                                        p.SetState(114)
1618
                                        p.Slice_()
1619
                                }
1620
1621
                        case 4:
1622
                                {
1623
                                        p.SetState(115)
1624
                                        p.Call()
1625
                                }
1626
1627
                        }
1628
1629
                }
1630
                p.SetState(122)
1631
                p.GetErrorHandler().Sync(p)
1632
                _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext())
1633
        }
1634
1635
        return localctx
1636
}
func ExprParser.expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1201
func (p *ExprParser) expression(_p int) (localctx IExpressionContext) {
1202
        var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
1203
        _parentState := p.GetState()
1204
        localctx = NewExpressionContext(p, p.GetParserRuleContext(), _parentState)
1205
        var _prevctx IExpressionContext = localctx
1206
        var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
1207
        _startState := 12
1208
        p.EnterRecursionRule(localctx, 12, ExprParserRULE_expression, _p)
1209
        var _la int
1210
1211
        defer func() {
1212
                p.UnrollRecursionContexts(_parentctx)
1213
        }()
1214
1215
        defer func() {
1216
                if err := recover(); err != nil {
1217
                        if v, ok := err.(antlr.RecognitionException); ok {
1218
                                localctx.SetException(v)
1219
                                p.GetErrorHandler().ReportError(p, v)
1220
                                p.GetErrorHandler().Recover(p, v)
1221
                        } else {
1222
                                panic(err)
1223
                        }
1224
                }
1225
        }()
1226
1227
        var _alt int
1228
1229
        p.EnterOuterAlt(localctx, 1)
1230
        p.SetState(82)
1231
        p.GetErrorHandler().Sync(p)
1232
        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) {
1233
        case 1:
1234
                {
1235
                        p.SetState(79)
1236
                        p.primaryExpr(0)
1237
                }
1238
1239
        case 2:
1240
                {
1241
                        p.SetState(80)
1242
1243
                        var _lt = p.GetTokenStream().LT(1)
1244
1245
                        localctx.(*ExpressionContext).unary_op = _lt
1246
1247
                        _la = p.GetTokenStream().LA(1)
1248
1249
                        if !(((_la-34)&-(0x1f+1)) == 0 && ((1<<uint((_la-34)))&((1<<(ExprParserEXCLAMATION-34))|(1<<(ExprParserPLUS-34))|(1<<(ExprParserMINUS-34))|(1<<(ExprParserCARET-34)))) != 0) {
1250
                                var _ri = p.GetErrorHandler().RecoverInline(p)
1251
1252
                                localctx.(*ExpressionContext).unary_op = _ri
1253
                        } else {
1254
                                p.GetErrorHandler().ReportMatch(p)
1255
                                p.Consume()
1256
                        }
1257
                }
1258
                {
1259
                        p.SetState(81)
1260
                        p.expression(6)
1261
                }
1262
1263
        }
1264
        p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
1265
        p.SetState(105)
1266
        p.GetErrorHandler().Sync(p)
1267
        _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 6, p.GetParserRuleContext())
1268
1269
        for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
1270
                if _alt == 1 {
1271
                        if p.GetParseListeners() != nil {
1272
                                p.TriggerExitRuleEvent()
1273
                        }
1274
                        _prevctx = localctx
1275
                        p.SetState(103)
1276
                        p.GetErrorHandler().Sync(p)
1277
                        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) {
1278
                        case 1:
1279
                                localctx = NewExpressionContext(p, _parentctx, _parentState)
1280
                                p.PushNewRecursionContext(localctx, _startState, ExprParserRULE_expression)
1281
                                p.SetState(84)
1282
1283
                                if !(p.Precpred(p.GetParserRuleContext(), 5)) {
1284
                                        panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", ""))
1285
                                }
1286
                                {
1287
                                        p.SetState(85)
1288
1289
                                        var _lt = p.GetTokenStream().LT(1)
1290
1291
                                        localctx.(*ExpressionContext).mul_op = _lt
1292
1293
                                        _la = p.GetTokenStream().LA(1)
1294
1295
                                        if !(((_la-29)&-(0x1f+1)) == 0 && ((1<<uint((_la-29)))&((1<<(ExprParserDIV-29))|(1<<(ExprParserMOD-29))|(1<<(ExprParserLSHIFT-29))|(1<<(ExprParserRSHIFT-29))|(1<<(ExprParserBIT_CLEAR-29))|(1<<(ExprParserSTAR-29))|(1<<(ExprParserAMPERSAND-29)))) != 0) {
1296
                                                var _ri = p.GetErrorHandler().RecoverInline(p)
1297
1298
                                                localctx.(*ExpressionContext).mul_op = _ri
1299
                                        } else {
1300
                                                p.GetErrorHandler().ReportMatch(p)
1301
                                                p.Consume()
1302
                                        }
1303
                                }
1304
                                {
1305
                                        p.SetState(86)
1306
                                        p.expression(6)
1307
                                }
1308
1309
                        case 2:
1310
                                localctx = NewExpressionContext(p, _parentctx, _parentState)
1311
                                p.PushNewRecursionContext(localctx, _startState, ExprParserRULE_expression)
1312
                                p.SetState(87)
1313
1314
                                if !(p.Precpred(p.GetParserRuleContext(), 4)) {
1315
                                        panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", ""))
1316
                                }
1317
                                {
1318
                                        p.SetState(88)
1319
1320
                                        var _lt = p.GetTokenStream().LT(1)
1321
1322
                                        localctx.(*ExpressionContext).add_op = _lt
1323
1324
                                        _la = p.GetTokenStream().LA(1)
1325
1326
                                        if !(((_la-28)&-(0x1f+1)) == 0 && ((1<<uint((_la-28)))&((1<<(ExprParserOR-28))|(1<<(ExprParserPLUS-28))|(1<<(ExprParserMINUS-28))|(1<<(ExprParserCARET-28)))) != 0) {
1327
                                                var _ri = p.GetErrorHandler().RecoverInline(p)
1328
1329
                                                localctx.(*ExpressionContext).add_op = _ri
1330
                                        } else {
1331
                                                p.GetErrorHandler().ReportMatch(p)
1332
                                                p.Consume()
1333
                                        }
1334
                                }
1335
                                {
1336
                                        p.SetState(89)
1337
                                        p.expression(5)
1338
                                }
1339
1340
                        case 3:
1341
                                localctx = NewExpressionContext(p, _parentctx, _parentState)
1342
                                p.PushNewRecursionContext(localctx, _startState, ExprParserRULE_expression)
1343
                                p.SetState(90)
1344
1345
                                if !(p.Precpred(p.GetParserRuleContext(), 3)) {
1346
                                        panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", ""))
1347
                                }
1348
                                {
1349
                                        p.SetState(91)
1350
1351
                                        var _lt = p.GetTokenStream().LT(1)
1352
1353
                                        localctx.(*ExpressionContext).rel_op = _lt
1354
1355
                                        _la = p.GetTokenStream().LA(1)
1356
1357
                                        if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<ExprParserEQUALS)|(1<<ExprParserNOT_EQUALS)|(1<<ExprParserLESS)|(1<<ExprParserLESS_OR_EQUALS)|(1<<ExprParserGREATER)|(1<<ExprParserGREATER_OR_EQUALS))) != 0) {
1358
                                                var _ri = p.GetErrorHandler().RecoverInline(p)
1359
1360
                                                localctx.(*ExpressionContext).rel_op = _ri
1361
                                        } else {
1362
                                                p.GetErrorHandler().ReportMatch(p)
1363
                                                p.Consume()
1364
                                        }
1365
                                }
1366
                                {
1367
                                        p.SetState(92)
1368
                                        p.expression(4)
1369
                                }
1370
1371
                        case 4:
1372
                                localctx = NewExpressionContext(p, _parentctx, _parentState)
1373
                                p.PushNewRecursionContext(localctx, _startState, ExprParserRULE_expression)
1374
                                p.SetState(93)
1375
1376
                                if !(p.Precpred(p.GetParserRuleContext(), 2)) {
1377
                                        panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", ""))
1378
                                }
1379
                                {
1380
                                        p.SetState(94)
1381
                                        p.Logical()
1382
                                }
1383
                                {
1384
                                        p.SetState(95)
1385
                                        p.expression(3)
1386
                                }
1387
1388
                        case 5:
1389
                                localctx = NewExpressionContext(p, _parentctx, _parentState)
1390
                                p.PushNewRecursionContext(localctx, _startState, ExprParserRULE_expression)
1391
                                p.SetState(97)
1392
1393
                                if !(p.Precpred(p.GetParserRuleContext(), 1)) {
1394
                                        panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", ""))
1395
                                }
1396
                                {
1397
                                        p.SetState(98)
1398
1399
                                        var _m = p.Match(ExprParserQUESTION)
1400
1401
                                        localctx.(*ExpressionContext).tertiary = _m
1402
                                }
1403
                                {
1404
                                        p.SetState(99)
1405
                                        p.expression(0)
1406
                                }
1407
                                {
1408
                                        p.SetState(100)
1409
                                        p.Match(ExprParserCOLON)
1410
                                }
1411
                                {
1412
                                        p.SetState(101)
1413
                                        p.expression(2)
1414
                                }
1415
1416
                        }
1417
1418
                }
1419
                p.SetState(107)
1420
                p.GetErrorHandler().Sync(p)
1421
                _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 6, p.GetParserRuleContext())
1422
        }
1423
1424
        return localctx
1425
}
func ExpressionContext.Logical
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1159
func (s *ExpressionContext) Logical() ILogicalContext {
1160
        var t = s.GetTypedRuleContext(reflect.TypeOf((*ILogicalContext)(nil)).Elem(), 0)
1161
1162
        if t == nil {
1163
                return nil
1164
        }
1165
1166
        return t.(ILogicalContext)
1167
}
func ExprParser.ParamType
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

714
func (p *ExprParser) ParamType() (localctx IParamTypeContext) {
715
        localctx = NewParamTypeContext(p, p.GetParserRuleContext(), p.GetState())
716
        p.EnterRule(localctx, 6, ExprParserRULE_paramType)
717
718
        defer func() {
719
                p.ExitRule()
720
        }()
721
722
        defer func() {
723
                if err := recover(); err != nil {
724
                        if v, ok := err.(antlr.RecognitionException); ok {
725
                                localctx.SetException(v)
726
                                p.GetErrorHandler().ReportError(p, v)
727
                                p.GetErrorHandler().Recover(p, v)
728
                        } else {
729
                                panic(err)
730
                        }
731
                }
732
        }()
733
734
        p.EnterOuterAlt(localctx, 1)
735
        p.SetState(68)
736
        p.GetErrorHandler().Sync(p)
737
738
        if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) == 1 {
739
                {
740
                        p.SetState(66)
741
                        p.Match(ExprParserL_BRACKET)
742
                }
743
                {
744
                        p.SetState(67)
745
                        p.Match(ExprParserR_BRACKET)
746
                }
747
748
        }
749
        {
750
                p.SetState(70)
751
                p.Match(ExprParserIDENTIFIER)
752
        }
753
754
        return localctx
755
}
func ExprParser.Slice_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3260
func (p *ExprParser) Slice_() (localctx ISlice_Context) {
3261
        localctx = NewSlice_Context(p, p.GetParserRuleContext(), p.GetState())
3262
        p.EnterRule(localctx, 42, ExprParserRULE_slice_)
3263
3264
        defer func() {
3265
                p.ExitRule()
3266
        }()
3267
3268
        defer func() {
3269
                if err := recover(); err != nil {
3270
                        if v, ok := err.(antlr.RecognitionException); ok {
3271
                                localctx.SetException(v)
3272
                                p.GetErrorHandler().ReportError(p, v)
3273
                                p.GetErrorHandler().Recover(p, v)
3274
                        } else {
3275
                                panic(err)
3276
                        }
3277
                }
3278
        }()
3279
3280
        p.EnterOuterAlt(localctx, 1)
3281
        {
3282
                p.SetState(177)
3283
                p.Match(ExprParserL_BRACKET)
3284
        }
3285
        p.SetState(193)
3286
        p.GetErrorHandler().Sync(p)
3287
        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 17, p.GetParserRuleContext()) {
3288
        case 1:
3289
                p.SetState(179)
3290
                p.GetErrorHandler().Sync(p)
3291
3292
                if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 {
3293
                        {
3294
                                p.SetState(178)
3295
                                p.expression(0)
3296
                        }
3297
3298
                }
3299
                {
3300
                        p.SetState(181)
3301
                        p.Match(ExprParserCOLON)
3302
                }
3303
                p.SetState(183)
3304
                p.GetErrorHandler().Sync(p)
3305
3306
                if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 {
3307
                        {
3308
                                p.SetState(182)
3309
                                p.expression(0)
3310
                        }
3311
3312
                }
3313
3314
        case 2:
3315
                p.SetState(186)
3316
                p.GetErrorHandler().Sync(p)
3317
3318
                if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 {
3319
                        {
3320
                                p.SetState(185)
3321
                                p.expression(0)
3322
                        }
3323
3324
                }
3325
                {
3326
                        p.SetState(188)
3327
                        p.Match(ExprParserCOLON)
3328
                }
3329
                {
3330
                        p.SetState(189)
3331
                        p.expression(0)
3332
                }
3333
                {
3334
                        p.SetState(190)
3335
                        p.Match(ExprParserCOLON)
3336
                }
3337
                {
3338
                        p.SetState(191)
3339
                        p.expression(0)
3340
                }
3341
3342
        }
3343
        {
3344
                p.SetState(195)
3345
                p.Match(ExprParserR_BRACKET)
3346
        }
3347
3348
        return localctx
3349
}
func ExprParser.BasicLit
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2303
func (p *ExprParser) BasicLit() (localctx IBasicLitContext) {
2304
        localctx = NewBasicLitContext(p, p.GetParserRuleContext(), p.GetState())
2305
        p.EnterRule(localctx, 26, ExprParserRULE_basicLit)
2306
2307
        defer func() {
2308
                p.ExitRule()
2309
        }()
2310
2311
        defer func() {
2312
                if err := recover(); err != nil {
2313
                        if v, ok := err.(antlr.RecognitionException); ok {
2314
                                localctx.SetException(v)
2315
                                p.GetErrorHandler().ReportError(p, v)
2316
                                p.GetErrorHandler().Recover(p, v)
2317
                        } else {
2318
                                panic(err)
2319
                        }
2320
                }
2321
        }()
2322
2323
        p.SetState(146)
2324
        p.GetErrorHandler().Sync(p)
2325
        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 10, p.GetParserRuleContext()) {
2326
        case 1:
2327
                p.EnterOuterAlt(localctx, 1)
2328
                {
2329
                        p.SetState(140)
2330
                        p.Nil_()
2331
                }
2332
2333
        case 2:
2334
                p.EnterOuterAlt(localctx, 2)
2335
                {
2336
                        p.SetState(141)
2337
                        p.Integer()
2338
                }
2339
2340
        case 3:
2341
                p.EnterOuterAlt(localctx, 3)
2342
                {
2343
                        p.SetState(142)
2344
                        p.String_()
2345
                }
2346
2347
        case 4:
2348
                p.EnterOuterAlt(localctx, 4)
2349
                {
2350
                        p.SetState(143)
2351
                        p.Float_()
2352
                }
2353
2354
        case 5:
2355
                p.EnterOuterAlt(localctx, 5)
2356
                {
2357
                        p.SetState(144)
2358
                        p.Match(ExprParserIMAGINARY_LIT)
2359
                }
2360
2361
        case 6:
2362
                p.EnterOuterAlt(localctx, 6)
2363
                {
2364
                        p.SetState(145)
2365
                        p.Match(ExprParserRUNE_LIT)
2366
                }
2367
2368
        }
2369
2370
        return localctx
2371
}
func Slice_Context.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3254
func (s *Slice_Context) ExitRule(listener antlr.ParseTreeListener) {
3255
        if listenerT, ok := listener.(ExprParserListener); ok {
3256
                listenerT.ExitSlice_(s)
3257
        }
3258
}
func LogicalContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1714
func (s *LogicalContext) ExitRule(listener antlr.ParseTreeListener) {
1715
        if listenerT, ok := listener.(ExprParserListener); ok {
1716
                listenerT.ExitLogical(s)
1717
        }
1718
}
func IntegerContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2443
func (s *IntegerContext) EnterRule(listener antlr.ParseTreeListener) {
2444
        if listenerT, ok := listener.(ExprParserListener); ok {
2445
                listenerT.EnterInteger(s)
2446
        }
2447
}
func IntegerContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2449
func (s *IntegerContext) ExitRule(listener antlr.ParseTreeListener) {
2450
        if listenerT, ok := listener.(ExprParserListener); ok {
2451
                listenerT.ExitInteger(s)
2452
        }
2453
}
func BasicLitContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2297
func (s *BasicLitContext) ExitRule(listener antlr.ParseTreeListener) {
2298
        if listenerT, ok := listener.(ExprParserListener); ok {
2299
                listenerT.ExitBasicLit(s)
2300
        }
2301
}
func Slice_Context.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3248
func (s *Slice_Context) EnterRule(listener antlr.ParseTreeListener) {
3249
        if listenerT, ok := listener.(ExprParserListener); ok {
3250
                listenerT.EnterSlice_(s)
3251
        }
3252
}
func BasicLitContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2291
func (s *BasicLitContext) EnterRule(listener antlr.ParseTreeListener) {
2292
        if listenerT, ok := listener.(ExprParserListener); ok {
2293
                listenerT.EnterBasicLit(s)
2294
        }
2295
}
func String_Context.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2643
func (s *String_Context) ExitRule(listener antlr.ParseTreeListener) {
2644
        if listenerT, ok := listener.(ExprParserListener); ok {
2645
                listenerT.ExitString_(s)
2646
        }
2647
}
func LiteralContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2156
func (s *LiteralContext) EnterRule(listener antlr.ParseTreeListener) {
2157
        if listenerT, ok := listener.(ExprParserListener); ok {
2158
                listenerT.EnterLiteral(s)
2159
        }
2160
}
func LiteralContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2162
func (s *LiteralContext) ExitRule(listener antlr.ParseTreeListener) {
2163
        if listenerT, ok := listener.(ExprParserListener); ok {
2164
                listenerT.ExitLiteral(s)
2165
        }
2166
}
func LogicalContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1708
func (s *LogicalContext) EnterRule(listener antlr.ParseTreeListener) {
1709
        if listenerT, ok := listener.(ExprParserListener); ok {
1710
                listenerT.EnterLogical(s)
1711
        }
1712
}
func String_Context.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2637
func (s *String_Context) EnterRule(listener antlr.ParseTreeListener) {
2638
        if listenerT, ok := listener.(ExprParserListener); ok {
2639
                listenerT.EnterString_(s)
2640
        }
2641
}
func @1980:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1980
func() {
1981
                if err := recover(); err != nil {
1982
                        if v, ok := err.(antlr.RecognitionException); ok {
1983
                                localctx.SetException(v)
1984
                                p.GetErrorHandler().ReportError(p, v)
1985
                                p.GetErrorHandler().Recover(p, v)
1986
                        } else {
1987
                                panic(err)
1988
                        }
1989
                }
1990
        }
func @1215:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1215
func() {
1216
                if err := recover(); err != nil {
1217
                        if v, ok := err.(antlr.RecognitionException); ok {
1218
                                localctx.SetException(v)
1219
                                p.GetErrorHandler().ReportError(p, v)
1220
                                p.GetErrorHandler().Recover(p, v)
1221
                        } else {
1222
                                panic(err)
1223
                        }
1224
                }
1225
        }
func @2176:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2176
func() {
2177
                if err := recover(); err != nil {
2178
                        if v, ok := err.(antlr.RecognitionException); ok {
2179
                                localctx.SetException(v)
2180
                                p.GetErrorHandler().ReportError(p, v)
2181
                                p.GetErrorHandler().Recover(p, v)
2182
                        } else {
2183
                                panic(err)
2184
                        }
2185
                }
2186
        }
func @722:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

722
func() {
723
                if err := recover(); err != nil {
724
                        if v, ok := err.(antlr.RecognitionException); ok {
725
                                localctx.SetException(v)
726
                                p.GetErrorHandler().ReportError(p, v)
727
                                p.GetErrorHandler().Recover(p, v)
728
                        } else {
729
                                panic(err)
730
                        }
731
                }
732
        }
func @2658:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2658
func() {
2659
                if err := recover(); err != nil {
2660
                        if v, ok := err.(antlr.RecognitionException); ok {
2661
                                localctx.SetException(v)
2662
                                p.GetErrorHandler().ReportError(p, v)
2663
                                p.GetErrorHandler().Recover(p, v)
2664
                        } else {
2665
                                panic(err)
2666
                        }
2667
                }
2668
        }
func @2311:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2311
func() {
2312
                if err := recover(); err != nil {
2313
                        if v, ok := err.(antlr.RecognitionException); ok {
2314
                                localctx.SetException(v)
2315
                                p.GetErrorHandler().ReportError(p, v)
2316
                                p.GetErrorHandler().Recover(p, v)
2317
                        } else {
2318
                                panic(err)
2319
                        }
2320
                }
2321
        }
func @1729:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1729
func() {
1730
                if err := recover(); err != nil {
1731
                        if v, ok := err.(antlr.RecognitionException); ok {
1732
                                localctx.SetException(v)
1733
                                p.GetErrorHandler().ReportError(p, v)
1734
                                p.GetErrorHandler().Recover(p, v)
1735
                        } else {
1736
                                panic(err)
1737
                        }
1738
                }
1739
        }
func @2464:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2464
func() {
2465
                if err := recover(); err != nil {
2466
                        if v, ok := err.(antlr.RecognitionException); ok {
2467
                                localctx.SetException(v)
2468
                                p.GetErrorHandler().ReportError(p, v)
2469
                                p.GetErrorHandler().Recover(p, v)
2470
                        } else {
2471
                                panic(err)
2472
                        }
2473
                }
2474
        }
func @3268:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3268
func() {
3269
                if err := recover(); err != nil {
3270
                        if v, ok := err.(antlr.RecognitionException); ok {
3271
                                localctx.SetException(v)
3272
                                p.GetErrorHandler().ReportError(p, v)
3273
                                p.GetErrorHandler().Recover(p, v)
3274
                        } else {
3275
                                panic(err)
3276
                        }
3277
                }
3278
        }
func @1861:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1861
func() {
1862
                if err := recover(); err != nil {
1863
                        if v, ok := err.(antlr.RecognitionException); ok {
1864
                                localctx.SetException(v)
1865
                                p.GetErrorHandler().ReportError(p, v)
1866
                                p.GetErrorHandler().Recover(p, v)
1867
                        } else {
1868
                                panic(err)
1869
                        }
1870
                }
1871
        }
func @602:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

602
func() {
603
                if err := recover(); err != nil {
604
                        if v, ok := err.(antlr.RecognitionException); ok {
605
                                localctx.SetException(v)
606
                                p.GetErrorHandler().ReportError(p, v)
607
                                p.GetErrorHandler().Recover(p, v)
608
                        } else {
609
                                panic(err)
610
                        }
611
                }
612
        }
func @837:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

837
func() {
838
                if err := recover(); err != nil {
839
                        if v, ok := err.(antlr.RecognitionException); ok {
840
                                localctx.SetException(v)
841
                                p.GetErrorHandler().ReportError(p, v)
842
                                p.GetErrorHandler().Recover(p, v)
843
                        } else {
844
                                panic(err)
845
                        }
846
                }
847
        }
func @497:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

497
func() {
498
                if err := recover(); err != nil {
499
                        if v, ok := err.(antlr.RecognitionException); ok {
500
                                localctx.SetException(v)
501
                                p.GetErrorHandler().ReportError(p, v)
502
                                p.GetErrorHandler().Recover(p, v)
503
                        } else {
504
                                panic(err)
505
                        }
506
                }
507
        }
func @1562:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1562
func() {
1563
                if err := recover(); err != nil {
1564
                        if v, ok := err.(antlr.RecognitionException); ok {
1565
                                localctx.SetException(v)
1566
                                p.GetErrorHandler().ReportError(p, v)
1567
                                p.GetErrorHandler().Recover(p, v)
1568
                        } else {
1569
                                panic(err)
1570
                        }
1571
                }
1572
        }
func ExprParser.ExpressionList
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2979
func (p *ExprParser) ExpressionList() (localctx IExpressionListContext) {
2980
        localctx = NewExpressionListContext(p, p.GetParserRuleContext(), p.GetState())
2981
        p.EnterRule(localctx, 38, ExprParserRULE_expressionList)
2982
2983
        defer func() {
2984
                p.ExitRule()
2985
        }()
2986
2987
        defer func() {
2988
                if err := recover(); err != nil {
2989
                        if v, ok := err.(antlr.RecognitionException); ok {
2990
                                localctx.SetException(v)
2991
                                p.GetErrorHandler().ReportError(p, v)
2992
                                p.GetErrorHandler().Recover(p, v)
2993
                        } else {
2994
                                panic(err)
2995
                        }
2996
                }
2997
        }()
2998
2999
        var _alt int
3000
3001
        p.EnterOuterAlt(localctx, 1)
3002
        {
3003
                p.SetState(160)
3004
                p.expression(0)
3005
        }
3006
        p.SetState(165)
3007
        p.GetErrorHandler().Sync(p)
3008
        _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 11, p.GetParserRuleContext())
3009
3010
        for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
3011
                if _alt == 1 {
3012
                        {
3013
                                p.SetState(161)
3014
                                p.Match(ExprParserCOMMA)
3015
                        }
3016
                        {
3017
                                p.SetState(162)
3018
                                p.expression(0)
3019
                        }
3020
3021
                }
3022
                p.SetState(167)
3023
                p.GetErrorHandler().Sync(p)
3024
                _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 11, p.GetParserRuleContext())
3025
        }
3026
3027
        return localctx
3028
}
func ExprParser.Call
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3110
func (p *ExprParser) Call() (localctx ICallContext) {
3111
        localctx = NewCallContext(p, p.GetParserRuleContext(), p.GetState())
3112
        p.EnterRule(localctx, 40, ExprParserRULE_call)
3113
3114
        defer func() {
3115
                p.ExitRule()
3116
        }()
3117
3118
        defer func() {
3119
                if err := recover(); err != nil {
3120
                        if v, ok := err.(antlr.RecognitionException); ok {
3121
                                localctx.SetException(v)
3122
                                p.GetErrorHandler().ReportError(p, v)
3123
                                p.GetErrorHandler().Recover(p, v)
3124
                        } else {
3125
                                panic(err)
3126
                        }
3127
                }
3128
        }()
3129
3130
        p.EnterOuterAlt(localctx, 1)
3131
        {
3132
                p.SetState(168)
3133
                p.Match(ExprParserL_PAREN)
3134
        }
3135
        p.SetState(173)
3136
        p.GetErrorHandler().Sync(p)
3137
3138
        if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 13, p.GetParserRuleContext()) == 1 {
3139
                {
3140
                        p.SetState(169)
3141
                        p.ExpressionList()
3142
                }
3143
                p.SetState(171)
3144
                p.GetErrorHandler().Sync(p)
3145
3146
                if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 {
3147
                        {
3148
                                p.SetState(170)
3149
                                p.Match(ExprParserELLIPSIS)
3150
                        }
3151
3152
                }
3153
3154
        }
3155
        {
3156
                p.SetState(175)
3157
                p.Match(ExprParserR_PAREN)
3158
        }
3159
3160
        return localctx
3161
}
func ExprParser.Index
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2853
func (p *ExprParser) Index() (localctx IIndexContext) {
2854
        localctx = NewIndexContext(p, p.GetParserRuleContext(), p.GetState())
2855
        p.EnterRule(localctx, 36, ExprParserRULE_index)
2856
2857
        defer func() {
2858
                p.ExitRule()
2859
        }()
2860
2861
        defer func() {
2862
                if err := recover(); err != nil {
2863
                        if v, ok := err.(antlr.RecognitionException); ok {
2864
                                localctx.SetException(v)
2865
                                p.GetErrorHandler().ReportError(p, v)
2866
                                p.GetErrorHandler().Recover(p, v)
2867
                        } else {
2868
                                panic(err)
2869
                        }
2870
                }
2871
        }()
2872
2873
        p.EnterOuterAlt(localctx, 1)
2874
        {
2875
                p.SetState(156)
2876
                p.Match(ExprParserL_BRACKET)
2877
        }
2878
        {
2879
                p.SetState(157)
2880
                p.expression(0)
2881
        }
2882
        {
2883
                p.SetState(158)
2884
                p.Match(ExprParserR_BRACKET)
2885
        }
2886
2887
        return localctx
2888
}
func ExprParser.Member
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2067
func (p *ExprParser) Member() (localctx IMemberContext) {
2068
        localctx = NewMemberContext(p, p.GetParserRuleContext(), p.GetState())
2069
        p.EnterRule(localctx, 22, ExprParserRULE_member)
2070
2071
        defer func() {
2072
                p.ExitRule()
2073
        }()
2074
2075
        defer func() {
2076
                if err := recover(); err != nil {
2077
                        if v, ok := err.(antlr.RecognitionException); ok {
2078
                                localctx.SetException(v)
2079
                                p.GetErrorHandler().ReportError(p, v)
2080
                                p.GetErrorHandler().Recover(p, v)
2081
                        } else {
2082
                                panic(err)
2083
                        }
2084
                }
2085
        }()
2086
2087
        p.EnterOuterAlt(localctx, 1)
2088
        {
2089
                p.SetState(135)
2090
                p.Match(ExprParserDOT)
2091
        }
2092
        {
2093
                p.SetState(136)
2094
                p.Match(ExprParserIDENTIFIER)
2095
        }
2096
2097
        return localctx
2098
}
func ExprParser.Sempred
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3351
func (p *ExprParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
3352
        switch ruleIndex {
3353
        case 6:
3354
                var t *ExpressionContext = nil
3355
                if localctx != nil {
3356
                        t = localctx.(*ExpressionContext)
3357
                }
3358
                return p.Expression_Sempred(t, predIndex)
3359
3360
        case 7:
3361
                var t *PrimaryExprContext = nil
3362
                if localctx != nil {
3363
                        t = localctx.(*PrimaryExprContext)
3364
                }
3365
                return p.PrimaryExpr_Sempred(t, predIndex)
3366
3367
        default:
3368
                panic("No predicate with index: " + fmt.Sprint(ruleIndex))
3369
        }
3370
}
func ExprParser.Misc
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

928
func (p *ExprParser) Misc() (localctx IMiscContext) {
929
        localctx = NewMiscContext(p, p.GetParserRuleContext(), p.GetState())
930
        p.EnterRule(localctx, 10, ExprParserRULE_misc)
931
932
        defer func() {
933
                p.ExitRule()
934
        }()
935
936
        defer func() {
937
                if err := recover(); err != nil {
938
                        if v, ok := err.(antlr.RecognitionException); ok {
939
                                localctx.SetException(v)
940
                                p.GetErrorHandler().ReportError(p, v)
941
                                p.GetErrorHandler().Recover(p, v)
942
                        } else {
943
                                panic(err)
944
                        }
945
                }
946
        }()
947
948
        p.EnterOuterAlt(localctx, 1)
949
        {
950
                p.SetState(75)
951
                p.Match(ExprParserWS)
952
        }
953
        {
954
                p.SetState(76)
955
                p.Match(ExprParserTERMINATOR)
956
        }
957
958
        return localctx
959
}
func ExprParser.Nil_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2554
func (p *ExprParser) Nil_() (localctx INil_Context) {
2555
        localctx = NewNil_Context(p, p.GetParserRuleContext(), p.GetState())
2556
        p.EnterRule(localctx, 30, ExprParserRULE_nil_)
2557
2558
        defer func() {
2559
                p.ExitRule()
2560
        }()
2561
2562
        defer func() {
2563
                if err := recover(); err != nil {
2564
                        if v, ok := err.(antlr.RecognitionException); ok {
2565
                                localctx.SetException(v)
2566
                                p.GetErrorHandler().ReportError(p, v)
2567
                                p.GetErrorHandler().Recover(p, v)
2568
                        } else {
2569
                                panic(err)
2570
                        }
2571
                }
2572
        }()
2573
2574
        p.EnterOuterAlt(localctx, 1)
2575
        {
2576
                p.SetState(150)
2577
                p.Match(ExprParserNIL_LIT)
2578
        }
2579
2580
        return localctx
2581
}
func ExprParser.Float_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2748
func (p *ExprParser) Float_() (localctx IFloat_Context) {
2749
        localctx = NewFloat_Context(p, p.GetParserRuleContext(), p.GetState())
2750
        p.EnterRule(localctx, 34, ExprParserRULE_float_)
2751
2752
        defer func() {
2753
                p.ExitRule()
2754
        }()
2755
2756
        defer func() {
2757
                if err := recover(); err != nil {
2758
                        if v, ok := err.(antlr.RecognitionException); ok {
2759
                                localctx.SetException(v)
2760
                                p.GetErrorHandler().ReportError(p, v)
2761
                                p.GetErrorHandler().Recover(p, v)
2762
                        } else {
2763
                                panic(err)
2764
                        }
2765
                }
2766
        }()
2767
2768
        p.EnterOuterAlt(localctx, 1)
2769
        {
2770
                p.SetState(154)
2771
                p.Match(ExprParserFLOAT_LIT)
2772
        }
2773
2774
        return localctx
2775
}
func ExprParser.Expression_Sempred
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3372
func (p *ExprParser) Expression_Sempred(localctx antlr.RuleContext, predIndex int) bool {
3373
        switch predIndex {
3374
        case 0:
3375
                return p.Precpred(p.GetParserRuleContext(), 5)
3376
3377
        case 1:
3378
                return p.Precpred(p.GetParserRuleContext(), 4)
3379
3380
        case 2:
3381
                return p.Precpred(p.GetParserRuleContext(), 3)
3382
3383
        case 3:
3384
                return p.Precpred(p.GetParserRuleContext(), 2)
3385
3386
        case 4:
3387
                return p.Precpred(p.GetParserRuleContext(), 1)
3388
3389
        default:
3390
                panic("No predicate with index: " + fmt.Sprint(predIndex))
3391
        }
3392
}
func Slice_Context.AllExpression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3217
func (s *Slice_Context) AllExpression() []IExpressionContext {
3218
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExpressionContext)(nil)).Elem())
3219
        var tst = make([]IExpressionContext, len(ts))
3220
3221
        for i, t := range ts {
3222
                if t != nil {
3223
                        tst[i] = t.(IExpressionContext)
3224
                }
3225
        }
3226
3227
        return tst
3228
}
func @936:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

936
func() {
937
                if err := recover(); err != nil {
938
                        if v, ok := err.(antlr.RecognitionException); ok {
939
                                localctx.SetException(v)
940
                                p.GetErrorHandler().ReportError(p, v)
941
                                p.GetErrorHandler().Recover(p, v)
942
                        } else {
943
                                panic(err)
944
                        }
945
                }
946
        }
func ExpressionContext.AllExpression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1064
func (s *ExpressionContext) AllExpression() []IExpressionContext {
1065
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExpressionContext)(nil)).Elem())
1066
        var tst = make([]IExpressionContext, len(ts))
1067
1068
        for i, t := range ts {
1069
                if t != nil {
1070
                        tst[i] = t.(IExpressionContext)
1071
                }
1072
        }
1073
1074
        return tst
1075
}
func @2075:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2075
func() {
2076
                if err := recover(); err != nil {
2077
                        if v, ok := err.(antlr.RecognitionException); ok {
2078
                                localctx.SetException(v)
2079
                                p.GetErrorHandler().ReportError(p, v)
2080
                                p.GetErrorHandler().Recover(p, v)
2081
                        } else {
2082
                                panic(err)
2083
                        }
2084
                }
2085
        }
func ParametersContext.AllParamComma
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

317
func (s *ParametersContext) AllParamComma() []IParamCommaContext {
318
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IParamCommaContext)(nil)).Elem())
319
        var tst = make([]IParamCommaContext, len(ts))
320
321
        for i, t := range ts {
322
                if t != nil {
323
                        tst[i] = t.(IParamCommaContext)
324
                }
325
        }
326
327
        return tst
328
}
func @3118:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3118
func() {
3119
                if err := recover(); err != nil {
3120
                        if v, ok := err.(antlr.RecognitionException); ok {
3121
                                localctx.SetException(v)
3122
                                p.GetErrorHandler().ReportError(p, v)
3123
                                p.GetErrorHandler().Recover(p, v)
3124
                        } else {
3125
                                panic(err)
3126
                        }
3127
                }
3128
        }
func @2987:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2987
func() {
2988
                if err := recover(); err != nil {
2989
                        if v, ok := err.(antlr.RecognitionException); ok {
2990
                                localctx.SetException(v)
2991
                                p.GetErrorHandler().ReportError(p, v)
2992
                                p.GetErrorHandler().Recover(p, v)
2993
                        } else {
2994
                                panic(err)
2995
                        }
2996
                }
2997
        }
func ExpressionListContext.AllExpression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2928
func (s *ExpressionListContext) AllExpression() []IExpressionContext {
2929
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExpressionContext)(nil)).Elem())
2930
        var tst = make([]IExpressionContext, len(ts))
2931
2932
        for i, t := range ts {
2933
                if t != nil {
2934
                        tst[i] = t.(IExpressionContext)
2935
                }
2936
        }
2937
2938
        return tst
2939
}
func @2861:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2861
func() {
2862
                if err := recover(); err != nil {
2863
                        if v, ok := err.(antlr.RecognitionException); ok {
2864
                                localctx.SetException(v)
2865
                                p.GetErrorHandler().ReportError(p, v)
2866
                                p.GetErrorHandler().Recover(p, v)
2867
                        } else {
2868
                                panic(err)
2869
                        }
2870
                }
2871
        }
func ParametersContext.AllParamDecl
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

294
func (s *ParametersContext) AllParamDecl() []IParamDeclContext {
295
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IParamDeclContext)(nil)).Elem())
296
        var tst = make([]IParamDeclContext, len(ts))
297
298
        for i, t := range ts {
299
                if t != nil {
300
                        tst[i] = t.(IParamDeclContext)
301
                }
302
        }
303
304
        return tst
305
}
func @2562:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2562
func() {
2563
                if err := recover(); err != nil {
2564
                        if v, ok := err.(antlr.RecognitionException); ok {
2565
                                localctx.SetException(v)
2566
                                p.GetErrorHandler().ReportError(p, v)
2567
                                p.GetErrorHandler().Recover(p, v)
2568
                        } else {
2569
                                panic(err)
2570
                        }
2571
                }
2572
        }
func @2756:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2756
func() {
2757
                if err := recover(); err != nil {
2758
                        if v, ok := err.(antlr.RecognitionException); ok {
2759
                                localctx.SetException(v)
2760
                                p.GetErrorHandler().ReportError(p, v)
2761
                                p.GetErrorHandler().Recover(p, v)
2762
                        } else {
2763
                                panic(err)
2764
                        }
2765
                }
2766
        }
func NewExpressionListContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2915
func NewExpressionListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionListContext {
2916
        var p = new(ExpressionListContext)
2917
2918
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2919
2920
        p.parser = parser
2921
        p.RuleIndex = ExprParserRULE_expressionList
2922
2923
        return p
2924
}
func NewIndexContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2802
func NewIndexContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IndexContext {
2803
        var p = new(IndexContext)
2804
2805
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2806
2807
        p.parser = parser
2808
        p.RuleIndex = ExprParserRULE_index
2809
2810
        return p
2811
}
func NewNil_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2517
func NewNil_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Nil_Context {
2518
        var p = new(Nil_Context)
2519
2520
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2521
2522
        p.parser = parser
2523
        p.RuleIndex = ExprParserRULE_nil_
2524
2525
        return p
2526
}
func NewMemberContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2026
func NewMemberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MemberContext {
2027
        var p = new(MemberContext)
2028
2029
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2030
2031
        p.parser = parser
2032
        p.RuleIndex = ExprParserRULE_member
2033
2034
        return p
2035
}
func NewFloat_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2711
func NewFloat_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Float_Context {
2712
        var p = new(Float_Context)
2713
2714
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
2715
2716
        p.parser = parser
2717
        p.RuleIndex = ExprParserRULE_float_
2718
2719
        return p
2720
}
func NewCallContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3055
func NewCallContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CallContext {
3056
        var p = new(CallContext)
3057
3058
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
3059
3060
        p.parser = parser
3061
        p.RuleIndex = ExprParserRULE_call
3062
3063
        return p
3064
}
func NewMiscContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

887
func NewMiscContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MiscContext {
888
        var p = new(MiscContext)
889
890
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
891
892
        p.parser = parser
893
        p.RuleIndex = ExprParserRULE_misc
894
895
        return p
896
}
func CallContext.ExpressionList
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3076
func (s *CallContext) ExpressionList() IExpressionListContext {
3077
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionListContext)(nil)).Elem(), 0)
3078
3079
        if t == nil {
3080
                return nil
3081
        }
3082
3083
        return t.(IExpressionListContext)
3084
}
func NewEmptyParamTypeContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

660
func NewEmptyParamTypeContext() *ParamTypeContext {
661
        var p = new(ParamTypeContext)
662
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
663
        p.RuleIndex = ExprParserRULE_paramType
664
        return p
665
}
func BasicLitContext.Nil_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2235
func (s *BasicLitContext) Nil_() INil_Context {
2236
        var t = s.GetTypedRuleContext(reflect.TypeOf((*INil_Context)(nil)).Elem(), 0)
2237
2238
        if t == nil {
2239
                return nil
2240
        }
2241
2242
        return t.(INil_Context)
2243
}
func IndexContext.Expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2819
func (s *IndexContext) Expression() IExpressionContext {
2820
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
2821
2822
        if t == nil {
2823
                return nil
2824
        }
2825
2826
        return t.(IExpressionContext)
2827
}
func NewEmptyLogicalContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1654
func NewEmptyLogicalContext() *LogicalContext {
1655
        var p = new(LogicalContext)
1656
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
1657
        p.RuleIndex = ExprParserRULE_logical
1658
        return p
1659
}
func PrimaryExprContext.Operand
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1465
func (s *PrimaryExprContext) Operand() IOperandContext {
1466
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IOperandContext)(nil)).Elem(), 0)
1467
1468
        if t == nil {
1469
                return nil
1470
        }
1471
1472
        return t.(IOperandContext)
1473
}
func BasicLitContext.String_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2255
func (s *BasicLitContext) String_() IString_Context {
2256
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IString_Context)(nil)).Elem(), 0)
2257
2258
        if t == nil {
2259
                return nil
2260
        }
2261
2262
        return t.(IString_Context)
2263
}
func NewEmptyBasicLitContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2213
func NewEmptyBasicLitContext() *BasicLitContext {
2214
        var p = new(BasicLitContext)
2215
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2216
        p.RuleIndex = ExprParserRULE_basicLit
2217
        return p
2218
}
func NewEmptyExpressionListContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2906
func NewEmptyExpressionListContext() *ExpressionListContext {
2907
        var p = new(ExpressionListContext)
2908
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2909
        p.RuleIndex = ExprParserRULE_expressionList
2910
        return p
2911
}
func PrimaryExprContext.PrimaryExpr
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1475
func (s *PrimaryExprContext) PrimaryExpr() IPrimaryExprContext {
1476
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IPrimaryExprContext)(nil)).Elem(), 0)
1477
1478
        if t == nil {
1479
                return nil
1480
        }
1481
1482
        return t.(IPrimaryExprContext)
1483
}
func NewEmptyIntegerContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2389
func NewEmptyIntegerContext() *IntegerContext {
2390
        var p = new(IntegerContext)
2391
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2392
        p.RuleIndex = ExprParserRULE_integer
2393
        return p
2394
}
func NewEmptyMiscContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

878
func NewEmptyMiscContext() *MiscContext {
879
        var p = new(MiscContext)
880
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
881
        p.RuleIndex = ExprParserRULE_misc
882
        return p
883
}
func NewEmptyExpressionContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1012
func NewEmptyExpressionContext() *ExpressionContext {
1013
        var p = new(ExpressionContext)
1014
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
1015
        p.RuleIndex = ExprParserRULE_expression
1016
        return p
1017
}
func ExpressionListContext.Expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2941
func (s *ExpressionListContext) Expression(i int) IExpressionContext {
2942
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
2943
2944
        if t == nil {
2945
                return nil
2946
        }
2947
2948
        return t.(IExpressionContext)
2949
}
func ExpressionsContext.Expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

795
func (s *ExpressionsContext) Expression() IExpressionContext {
796
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
797
798
        if t == nil {
799
                return nil
800
        }
801
802
        return t.(IExpressionContext)
803
}
func LiteralContext.BasicLit
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2138
func (s *LiteralContext) BasicLit() IBasicLitContext {
2139
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IBasicLitContext)(nil)).Elem(), 0)
2140
2141
        if t == nil {
2142
                return nil
2143
        }
2144
2145
        return t.(IBasicLitContext)
2146
}
func BasicLitContext.Float_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2265
func (s *BasicLitContext) Float_() IFloat_Context {
2266
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IFloat_Context)(nil)).Elem(), 0)
2267
2268
        if t == nil {
2269
                return nil
2270
        }
2271
2272
        return t.(IFloat_Context)
2273
}
func NewEmptyExpressionsContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

773
func NewEmptyExpressionsContext() *ExpressionsContext {
774
        var p = new(ExpressionsContext)
775
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
776
        p.RuleIndex = ExprParserRULE_expressions
777
        return p
778
}
func NewEmptyCallContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3046
func NewEmptyCallContext() *CallContext {
3047
        var p = new(CallContext)
3048
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
3049
        p.RuleIndex = ExprParserRULE_call
3050
        return p
3051
}
func PrimaryExprContext.Member
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1485
func (s *PrimaryExprContext) Member() IMemberContext {
1486
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberContext)(nil)).Elem(), 0)
1487
1488
        if t == nil {
1489
                return nil
1490
        }
1491
1492
        return t.(IMemberContext)
1493
}
func PrimaryExprContext.Slice_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1505
func (s *PrimaryExprContext) Slice_() ISlice_Context {
1506
        var t = s.GetTypedRuleContext(reflect.TypeOf((*ISlice_Context)(nil)).Elem(), 0)
1507
1508
        if t == nil {
1509
                return nil
1510
        }
1511
1512
        return t.(ISlice_Context)
1513
}
func NewEmptyOperandContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1773
func NewEmptyOperandContext() *OperandContext {
1774
        var p = new(OperandContext)
1775
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
1776
        p.RuleIndex = ExprParserRULE_operand
1777
        return p
1778
}
func NewEmptyPrimaryExprContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1443
func NewEmptyPrimaryExprContext() *PrimaryExprContext {
1444
        var p = new(PrimaryExprContext)
1445
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
1446
        p.RuleIndex = ExprParserRULE_primaryExpr
1447
        return p
1448
}
func NewEmptyIndexContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2793
func NewEmptyIndexContext() *IndexContext {
2794
        var p = new(IndexContext)
2795
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2796
        p.RuleIndex = ExprParserRULE_index
2797
        return p
2798
}
func NewEmptyLiteralContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2116
func NewEmptyLiteralContext() *LiteralContext {
2117
        var p = new(LiteralContext)
2118
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2119
        p.RuleIndex = ExprParserRULE_literal
2120
        return p
2121
}
func OperandContext.Literal
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1795
func (s *OperandContext) Literal() ILiteralContext {
1796
        var t = s.GetTypedRuleContext(reflect.TypeOf((*ILiteralContext)(nil)).Elem(), 0)
1797
1798
        if t == nil {
1799
                return nil
1800
        }
1801
1802
        return t.(ILiteralContext)
1803
}
func OperandContext.Var_
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1805
func (s *OperandContext) Var_() IVar_Context {
1806
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IVar_Context)(nil)).Elem(), 0)
1807
1808
        if t == nil {
1809
                return nil
1810
        }
1811
1812
        return t.(IVar_Context)
1813
}
func BasicLitContext.Integer
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2245
func (s *BasicLitContext) Integer() IIntegerContext {
2246
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IIntegerContext)(nil)).Elem(), 0)
2247
2248
        if t == nil {
2249
                return nil
2250
        }
2251
2252
        return t.(IIntegerContext)
2253
}
func OperandContext.Expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1819
func (s *OperandContext) Expression() IExpressionContext {
1820
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
1821
1822
        if t == nil {
1823
                return nil
1824
        }
1825
1826
        return t.(IExpressionContext)
1827
}
func NewEmptyFloat_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2702
func NewEmptyFloat_Context() *Float_Context {
2703
        var p = new(Float_Context)
2704
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2705
        p.RuleIndex = ExprParserRULE_float_
2706
        return p
2707
}
func NewEmptySlice_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3179
func NewEmptySlice_Context() *Slice_Context {
3180
        var p = new(Slice_Context)
3181
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
3182
        p.RuleIndex = ExprParserRULE_slice_
3183
        return p
3184
}
func PrimaryExprContext.Index
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1495
func (s *PrimaryExprContext) Index() IIndexContext {
1496
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IIndexContext)(nil)).Elem(), 0)
1497
1498
        if t == nil {
1499
                return nil
1500
        }
1501
1502
        return t.(IIndexContext)
1503
}
func ExpressionContext.PrimaryExpr
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1054
func (s *ExpressionContext) PrimaryExpr() IPrimaryExprContext {
1055
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IPrimaryExprContext)(nil)).Elem(), 0)
1056
1057
        if t == nil {
1058
                return nil
1059
        }
1060
1061
        return t.(IPrimaryExprContext)
1062
}
func Slice_Context.Expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3230
func (s *Slice_Context) Expression(i int) IExpressionContext {
3231
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
3232
3233
        if t == nil {
3234
                return nil
3235
        }
3236
3237
        return t.(IExpressionContext)
3238
}
func NewEmptyParamDeclContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

534
func NewEmptyParamDeclContext() *ParamDeclContext {
535
        var p = new(ParamDeclContext)
536
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
537
        p.RuleIndex = ExprParserRULE_paramDecl
538
        return p
539
}
func NewEmptyParamCommaContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

443
func NewEmptyParamCommaContext() *ParamCommaContext {
444
        var p = new(ParamCommaContext)
445
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
446
        p.RuleIndex = ExprParserRULE_paramComma
447
        return p
448
}
func ParametersContext.ParamComma
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

330
func (s *ParametersContext) ParamComma(i int) IParamCommaContext {
331
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamCommaContext)(nil)).Elem(), i)
332
333
        if t == nil {
334
                return nil
335
        }
336
337
        return t.(IParamCommaContext)
338
}
func NewEmptyVar_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1926
func NewEmptyVar_Context() *Var_Context {
1927
        var p = new(Var_Context)
1928
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
1929
        p.RuleIndex = ExprParserRULE_var_
1930
        return p
1931
}
func NewEmptyMemberContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2017
func NewEmptyMemberContext() *MemberContext {
2018
        var p = new(MemberContext)
2019
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2020
        p.RuleIndex = ExprParserRULE_member
2021
        return p
2022
}
func ExpressionContext.Expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1077
func (s *ExpressionContext) Expression(i int) IExpressionContext {
1078
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
1079
1080
        if t == nil {
1081
                return nil
1082
        }
1083
1084
        return t.(IExpressionContext)
1085
}
func ParametersContext.ParamDecl
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

307
func (s *ParametersContext) ParamDecl(i int) IParamDeclContext {
308
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IParamDeclContext)(nil)).Elem(), i)
309
310
        if t == nil {
311
                return nil
312
        }
313
314
        return t.(IParamDeclContext)
315
}
func NewEmptyString_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2599
func NewEmptyString_Context() *String_Context {
2600
        var p = new(String_Context)
2601
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2602
        p.RuleIndex = ExprParserRULE_string_
2603
        return p
2604
}
func PrimaryExprContext.Call
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1515
func (s *PrimaryExprContext) Call() ICallContext {
1516
        var t = s.GetTypedRuleContext(reflect.TypeOf((*ICallContext)(nil)).Elem(), 0)
1517
1518
        if t == nil {
1519
                return nil
1520
        }
1521
1522
        return t.(ICallContext)
1523
}
func NewEmptyNil_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2508
func NewEmptyNil_Context() *Nil_Context {
2509
        var p = new(Nil_Context)
2510
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
2511
        p.RuleIndex = ExprParserRULE_nil_
2512
        return p
2513
}
func NewEmptyParametersContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

264
func NewEmptyParametersContext() *ParametersContext {
265
        var p = new(ParametersContext)
266
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
267
        p.RuleIndex = ExprParserRULE_parameters
268
        return p
269
}
func ExprParser.PrimaryExpr_Sempred
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3394
func (p *ExprParser) PrimaryExpr_Sempred(localctx antlr.RuleContext, predIndex int) bool {
3395
        switch predIndex {
3396
        case 5:
3397
                return p.Precpred(p.GetParserRuleContext(), 1)
3398
3399
        default:
3400
                panic("No predicate with index: " + fmt.Sprint(predIndex))
3401
        }
3402
}
func IndexContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2841
func (s *IndexContext) EnterRule(listener antlr.ParseTreeListener) {
2842
        if listenerT, ok := listener.(ExprParserListener); ok {
2843
                listenerT.EnterIndex(s)
2844
        }
2845
}
func Nil_Context.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2542
func (s *Nil_Context) EnterRule(listener antlr.ParseTreeListener) {
2543
        if listenerT, ok := listener.(ExprParserListener); ok {
2544
                listenerT.EnterNil_(s)
2545
        }
2546
}
func CallContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3104
func (s *CallContext) ExitRule(listener antlr.ParseTreeListener) {
3105
        if listenerT, ok := listener.(ExprParserListener); ok {
3106
                listenerT.ExitCall(s)
3107
        }
3108
}
func CallContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3098
func (s *CallContext) EnterRule(listener antlr.ParseTreeListener) {
3099
        if listenerT, ok := listener.(ExprParserListener); ok {
3100
                listenerT.EnterCall(s)
3101
        }
3102
}
func ExpressionListContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2973
func (s *ExpressionListContext) ExitRule(listener antlr.ParseTreeListener) {
2974
        if listenerT, ok := listener.(ExprParserListener); ok {
2975
                listenerT.ExitExpressionList(s)
2976
        }
2977
}
func ExpressionListContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2967
func (s *ExpressionListContext) EnterRule(listener antlr.ParseTreeListener) {
2968
        if listenerT, ok := listener.(ExprParserListener); ok {
2969
                listenerT.EnterExpressionList(s)
2970
        }
2971
}
func IndexContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2847
func (s *IndexContext) ExitRule(listener antlr.ParseTreeListener) {
2848
        if listenerT, ok := listener.(ExprParserListener); ok {
2849
                listenerT.ExitIndex(s)
2850
        }
2851
}
func MiscContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

916
func (s *MiscContext) EnterRule(listener antlr.ParseTreeListener) {
917
        if listenerT, ok := listener.(ExprParserListener); ok {
918
                listenerT.EnterMisc(s)
919
        }
920
}
func MiscContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

922
func (s *MiscContext) ExitRule(listener antlr.ParseTreeListener) {
923
        if listenerT, ok := listener.(ExprParserListener); ok {
924
                listenerT.ExitMisc(s)
925
        }
926
}
func Float_Context.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2742
func (s *Float_Context) ExitRule(listener antlr.ParseTreeListener) {
2743
        if listenerT, ok := listener.(ExprParserListener); ok {
2744
                listenerT.ExitFloat_(s)
2745
        }
2746
}
func Float_Context.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2736
func (s *Float_Context) EnterRule(listener antlr.ParseTreeListener) {
2737
        if listenerT, ok := listener.(ExprParserListener); ok {
2738
                listenerT.EnterFloat_(s)
2739
        }
2740
}
func MemberContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2055
func (s *MemberContext) EnterRule(listener antlr.ParseTreeListener) {
2056
        if listenerT, ok := listener.(ExprParserListener); ok {
2057
                listenerT.EnterMember(s)
2058
        }
2059
}
func MemberContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2061
func (s *MemberContext) ExitRule(listener antlr.ParseTreeListener) {
2062
        if listenerT, ok := listener.(ExprParserListener); ok {
2063
                listenerT.ExitMember(s)
2064
        }
2065
}
func Nil_Context.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2548
func (s *Nil_Context) ExitRule(listener antlr.ParseTreeListener) {
2549
        if listenerT, ok := listener.(ExprParserListener); ok {
2550
                listenerT.ExitNil_(s)
2551
        }
2552
}
func IndexContext.R_BRACKET
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2829
func (s *IndexContext) R_BRACKET() antlr.TerminalNode {
2830
        return s.GetToken(ExprParserR_BRACKET, 0)
2831
}
func LogicalContext.LOGICAL_AND
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1676
func (s *LogicalContext) LOGICAL_AND() antlr.TerminalNode {
1677
        return s.GetToken(ExprParserLOGICAL_AND, 0)
1678
}
func OperandContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1793
func (s *OperandContext) GetParser() antlr.Parser { return s.parser }
func ParametersContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

284
func (s *ParametersContext) GetParser() antlr.Parser { return s.parser }
func ParametersContext.EOF
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

286
func (s *ParametersContext) EOF() antlr.TerminalNode {
287
        return s.GetToken(ExprParserEOF, 0)
288
}
func MiscContext.WS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

900
func (s *MiscContext) WS() antlr.TerminalNode {
901
        return s.GetToken(ExprParserWS, 0)
902
}
func LogicalContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1704
func (s *LogicalContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1705
        return antlr.TreesStringTree(s, ruleNames, recog)
1706
}
func LogicalContext.LOGICAL_OR_UPPER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1696
func (s *LogicalContext) LOGICAL_OR_UPPER() antlr.TerminalNode {
1697
        return s.GetToken(ExprParserLOGICAL_OR_UPPER, 0)
1698
}
func LiteralContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2152
func (s *LiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2153
        return antlr.TreesStringTree(s, ruleNames, recog)
2154
}
func LogicalContext.LOGICAL_AND_UPPER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1692
func (s *LogicalContext) LOGICAL_AND_UPPER() antlr.TerminalNode {
1693
        return s.GetToken(ExprParserLOGICAL_AND_UPPER, 0)
1694
}
func LogicalContext.LOGICAL_OR_LOWER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1688
func (s *LogicalContext) LOGICAL_OR_LOWER() antlr.TerminalNode {
1689
        return s.GetToken(ExprParserLOGICAL_OR_LOWER, 0)
1690
}
func LogicalContext.LOGICAL_AND_LOWER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1684
func (s *LogicalContext) LOGICAL_AND_LOWER() antlr.TerminalNode {
1685
        return s.GetToken(ExprParserLOGICAL_AND_LOWER, 0)
1686
}
func LogicalContext.LOGICAL_OR
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1680
func (s *LogicalContext) LOGICAL_OR() antlr.TerminalNode {
1681
        return s.GetToken(ExprParserLOGICAL_OR, 0)
1682
}
func MiscContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

898
func (s *MiscContext) GetParser() antlr.Parser { return s.parser }
func LogicalContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1674
func (s *LogicalContext) GetParser() antlr.Parser { return s.parser }
func ParametersContext.STAR
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

290
func (s *ParametersContext) STAR() antlr.TerminalNode {
291
        return s.GetToken(ExprParserSTAR, 0)
292
}
func ParametersContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

344
func (s *ParametersContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
345
        return antlr.TreesStringTree(s, ruleNames, recog)
346
}
func BasicLitContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2233
func (s *BasicLitContext) GetParser() antlr.Parser { return s.parser }
func ExprParser.PrimaryExpr
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1545
func (p *ExprParser) PrimaryExpr() (localctx IPrimaryExprContext) {
1546
        return p.primaryExpr(0)
1547
}
func PrimaryExprContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1529
func (s *PrimaryExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1530
        return antlr.TreesStringTree(s, ruleNames, recog)
1531
}
func PrimaryExprContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1463
func (s *PrimaryExprContext) GetParser() antlr.Parser { return s.parser }
func ParamCommaContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

463
func (s *ParamCommaContext) GetParser() antlr.Parser { return s.parser }
func BasicLitContext.IMAGINARY_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2275
func (s *BasicLitContext) IMAGINARY_LIT() antlr.TerminalNode {
2276
        return s.GetToken(ExprParserIMAGINARY_LIT, 0)
2277
}
func BasicLitContext.RUNE_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2279
func (s *BasicLitContext) RUNE_LIT() antlr.TerminalNode {
2280
        return s.GetToken(ExprParserRUNE_LIT, 0)
2281
}
func ExprParser.Expression
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1197
func (p *ExprParser) Expression() (localctx IExpressionContext) {
1198
        return p.expression(0)
1199
}
func BasicLitContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2287
func (s *BasicLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2288
        return antlr.TreesStringTree(s, ruleNames, recog)
2289
}
func ExpressionContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1181
func (s *ExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1182
        return antlr.TreesStringTree(s, ruleNames, recog)
1183
}
func ExpressionContext.QUESTION
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1173
func (s *ExpressionContext) QUESTION() antlr.TerminalNode {
1174
        return s.GetToken(ExprParserQUESTION, 0)
1175
}
func ExpressionContext.COLON
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1169
func (s *ExpressionContext) COLON() antlr.TerminalNode {
1170
        return s.GetToken(ExprParserCOLON, 0)
1171
}
func ExpressionContext.GREATER_OR_EQUALS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1155
func (s *ExpressionContext) GREATER_OR_EQUALS() antlr.TerminalNode {
1156
        return s.GetToken(ExprParserGREATER_OR_EQUALS, 0)
1157
}
func ExpressionContext.GREATER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1151
func (s *ExpressionContext) GREATER() antlr.TerminalNode {
1152
        return s.GetToken(ExprParserGREATER, 0)
1153
}
func ExpressionContext.LESS_OR_EQUALS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1147
func (s *ExpressionContext) LESS_OR_EQUALS() antlr.TerminalNode {
1148
        return s.GetToken(ExprParserLESS_OR_EQUALS, 0)
1149
}
func ParamCommaContext.COMMA
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

465
func (s *ParamCommaContext) COMMA() antlr.TerminalNode {
466
        return s.GetToken(ExprParserCOMMA, 0)
467
}
func ExpressionContext.LESS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1143
func (s *ExpressionContext) LESS() antlr.TerminalNode {
1144
        return s.GetToken(ExprParserLESS, 0)
1145
}
func IntegerContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2409
func (s *IntegerContext) GetParser() antlr.Parser { return s.parser }
func IntegerContext.DECIMAL_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2411
func (s *IntegerContext) DECIMAL_LIT() antlr.TerminalNode {
2412
        return s.GetToken(ExprParserDECIMAL_LIT, 0)
2413
}
func IntegerContext.BINARY_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2415
func (s *IntegerContext) BINARY_LIT() antlr.TerminalNode {
2416
        return s.GetToken(ExprParserBINARY_LIT, 0)
2417
}
func IntegerContext.OCTAL_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2419
func (s *IntegerContext) OCTAL_LIT() antlr.TerminalNode {
2420
        return s.GetToken(ExprParserOCTAL_LIT, 0)
2421
}
func IntegerContext.HEX_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2423
func (s *IntegerContext) HEX_LIT() antlr.TerminalNode {
2424
        return s.GetToken(ExprParserHEX_LIT, 0)
2425
}
func IntegerContext.IMAGINARY_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2427
func (s *IntegerContext) IMAGINARY_LIT() antlr.TerminalNode {
2428
        return s.GetToken(ExprParserIMAGINARY_LIT, 0)
2429
}
func IntegerContext.RUNE_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2431
func (s *IntegerContext) RUNE_LIT() antlr.TerminalNode {
2432
        return s.GetToken(ExprParserRUNE_LIT, 0)
2433
}
func ExpressionContext.NOT_EQUALS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1139
func (s *ExpressionContext) NOT_EQUALS() antlr.TerminalNode {
1140
        return s.GetToken(ExprParserNOT_EQUALS, 0)
1141
}
func IntegerContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2439
func (s *IntegerContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2440
        return antlr.TreesStringTree(s, ruleNames, recog)
2441
}
func ExpressionContext.EQUALS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1135
func (s *ExpressionContext) EQUALS() antlr.TerminalNode {
1136
        return s.GetToken(ExprParserEQUALS, 0)
1137
}
func ExpressionContext.OR
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1131
func (s *ExpressionContext) OR() antlr.TerminalNode {
1132
        return s.GetToken(ExprParserOR, 0)
1133
}
func ExpressionContext.BIT_CLEAR
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1127
func (s *ExpressionContext) BIT_CLEAR() antlr.TerminalNode {
1128
        return s.GetToken(ExprParserBIT_CLEAR, 0)
1129
}
func ExpressionContext.AMPERSAND
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1123
func (s *ExpressionContext) AMPERSAND() antlr.TerminalNode {
1124
        return s.GetToken(ExprParserAMPERSAND, 0)
1125
}
func ExpressionContext.RSHIFT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1119
func (s *ExpressionContext) RSHIFT() antlr.TerminalNode {
1120
        return s.GetToken(ExprParserRSHIFT, 0)
1121
}
func ExpressionContext.LSHIFT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1115
func (s *ExpressionContext) LSHIFT() antlr.TerminalNode {
1116
        return s.GetToken(ExprParserLSHIFT, 0)
1117
}
func Slice_Context.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3244
func (s *Slice_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
3245
        return antlr.TreesStringTree(s, ruleNames, recog)
3246
}
func ExpressionContext.MOD
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1111
func (s *ExpressionContext) MOD() antlr.TerminalNode {
1112
        return s.GetToken(ExprParserMOD, 0)
1113
}
func Nil_Context.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2528
func (s *Nil_Context) GetParser() antlr.Parser { return s.parser }
func Nil_Context.NIL_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2530
func (s *Nil_Context) NIL_LIT() antlr.TerminalNode {
2531
        return s.GetToken(ExprParserNIL_LIT, 0)
2532
}
func Nil_Context.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2534
func (s *Nil_Context) GetRuleContext() antlr.RuleContext {
2535
        return s
2536
}
func Nil_Context.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2538
func (s *Nil_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2539
        return antlr.TreesStringTree(s, ruleNames, recog)
2540
}
func @2071:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2071
func() {
2072
                p.ExitRule()
2073
        }
func OperandContext.R_PAREN
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1829
func (s *OperandContext) R_PAREN() antlr.TerminalNode {
1830
        return s.GetToken(ExprParserR_PAREN, 0)
1831
}
func ParamCommaContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

473
func (s *ParamCommaContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
474
        return antlr.TreesStringTree(s, ruleNames, recog)
475
}
func @2558:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2558
func() {
2559
                p.ExitRule()
2560
        }
func ExpressionContext.STAR
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1103
func (s *ExpressionContext) STAR() antlr.TerminalNode {
1104
        return s.GetToken(ExprParserSTAR, 0)
1105
}
func ExpressionContext.CARET
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1099
func (s *ExpressionContext) CARET() antlr.TerminalNode {
1100
        return s.GetToken(ExprParserCARET, 0)
1101
}
func ParamDeclContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

554
func (s *ParamDeclContext) GetParser() antlr.Parser { return s.parser }
func ExpressionContext.EXCLAMATION
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1095
func (s *ExpressionContext) EXCLAMATION() antlr.TerminalNode {
1096
        return s.GetToken(ExprParserEXCLAMATION, 0)
1097
}
func String_Context.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2619
func (s *String_Context) GetParser() antlr.Parser { return s.parser }
func String_Context.RAW_STRING_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2621
func (s *String_Context) RAW_STRING_LIT() antlr.TerminalNode {
2622
        return s.GetToken(ExprParserRAW_STRING_LIT, 0)
2623
}
func String_Context.INTERPRETED_STRING_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2625
func (s *String_Context) INTERPRETED_STRING_LIT() antlr.TerminalNode {
2626
        return s.GetToken(ExprParserINTERPRETED_STRING_LIT, 0)
2627
}
func ExpressionContext.MINUS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1091
func (s *ExpressionContext) MINUS() antlr.TerminalNode {
1092
        return s.GetToken(ExprParserMINUS, 0)
1093
}
func String_Context.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2633
func (s *String_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2634
        return antlr.TreesStringTree(s, ruleNames, recog)
2635
}
func ExpressionContext.PLUS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1087
func (s *ExpressionContext) PLUS() antlr.TerminalNode {
1088
        return s.GetToken(ExprParserPLUS, 0)
1089
}
func ExpressionContext.SetTertiary
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1052
func (s *ExpressionContext) SetTertiary(v antlr.Token) { s.tertiary = v }
func ExpressionContext.SetRel_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1050
func (s *ExpressionContext) SetRel_op(v antlr.Token) { s.rel_op = v }
func ExpressionContext.SetAdd_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1048
func (s *ExpressionContext) SetAdd_op(v antlr.Token) { s.add_op = v }
func ExpressionContext.SetMul_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1046
func (s *ExpressionContext) SetMul_op(v antlr.Token) { s.mul_op = v }
func ExpressionContext.SetUnary_op
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1044
func (s *ExpressionContext) SetUnary_op(v antlr.Token) { s.unary_op = v }
func Slice_Context.COLON
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3213
func (s *Slice_Context) COLON(i int) antlr.TerminalNode {
3214
        return s.GetToken(ExprParserCOLON, i)
3215
}
func ExpressionContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1032
func (s *ExpressionContext) GetParser() antlr.Parser { return s.parser }
func Float_Context.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2722
func (s *Float_Context) GetParser() antlr.Parser { return s.parser }
func Float_Context.FLOAT_LIT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2724
func (s *Float_Context) FLOAT_LIT() antlr.TerminalNode {
2725
        return s.GetToken(ExprParserFLOAT_LIT, 0)
2726
}
func Float_Context.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2728
func (s *Float_Context) GetRuleContext() antlr.RuleContext {
2729
        return s
2730
}
func Float_Context.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2732
func (s *Float_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2733
        return antlr.TreesStringTree(s, ruleNames, recog)
2734
}
func MemberContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2051
func (s *MemberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2052
        return antlr.TreesStringTree(s, ruleNames, recog)
2053
}
func MemberContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2047
func (s *MemberContext) GetRuleContext() antlr.RuleContext {
2048
        return s
2049
}
func Slice_Context.AllCOLON
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3209
func (s *Slice_Context) AllCOLON() []antlr.TerminalNode {
3210
        return s.GetTokens(ExprParserCOLON)
3211
}
func @2752:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2752
func() {
2753
                p.ExitRule()
2754
        }
func @932:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

932
func() {
933
                p.ExitRule()
934
        }
func MemberContext.IDENTIFIER
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2043
func (s *MemberContext) IDENTIFIER() antlr.TerminalNode {
2044
        return s.GetToken(ExprParserIDENTIFIER, 0)
2045
}
func Slice_Context.R_BRACKET
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3205
func (s *Slice_Context) R_BRACKET() antlr.TerminalNode {
3206
        return s.GetToken(ExprParserR_BRACKET, 0)
3207
}
func MemberContext.DOT
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2039
func (s *MemberContext) DOT() antlr.TerminalNode {
2040
        return s.GetToken(ExprParserDOT, 0)
2041
}
func IndexContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2813
func (s *IndexContext) GetParser() antlr.Parser { return s.parser }
func IndexContext.L_BRACKET
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2815
func (s *IndexContext) L_BRACKET() antlr.TerminalNode {
2816
        return s.GetToken(ExprParserL_BRACKET, 0)
2817
}
func MiscContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

912
func (s *MiscContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
913
        return antlr.TreesStringTree(s, ruleNames, recog)
914
}
func Var_Context.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1956
func (s *Var_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1957
        return antlr.TreesStringTree(s, ruleNames, recog)
1958
}
func IndexContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2833
func (s *IndexContext) GetRuleContext() antlr.RuleContext {
2834
        return s
2835
}
func IndexContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2837
func (s *IndexContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2838
        return antlr.TreesStringTree(s, ruleNames, recog)
2839
}
func MiscContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

908
func (s *MiscContext) GetRuleContext() antlr.RuleContext {
909
        return s
910
}
func MemberContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2037
func (s *MemberContext) GetParser() antlr.Parser { return s.parser }
func MiscContext.TERMINATOR
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

904
func (s *MiscContext) TERMINATOR() antlr.TerminalNode {
905
        return s.GetToken(ExprParserTERMINATOR, 0)
906
}
func @2857:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2857
func() {
2858
                p.ExitRule()
2859
        }
func LiteralContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2136
func (s *LiteralContext) GetParser() antlr.Parser { return s.parser }
func OperandContext.L_PAREN
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1815
func (s *OperandContext) L_PAREN() antlr.TerminalNode {
1816
        return s.GetToken(ExprParserL_PAREN, 0)
1817
}
func ExpressionContext.DIV
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1107
func (s *ExpressionContext) DIV() antlr.TerminalNode {
1108
        return s.GetToken(ExprParserDIV, 0)
1109
}
func Slice_Context.L_BRACKET
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3201
func (s *Slice_Context) L_BRACKET() antlr.TerminalNode {
3202
        return s.GetToken(ExprParserL_BRACKET, 0)
3203
}
func ExpressionListContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2926
func (s *ExpressionListContext) GetParser() antlr.Parser { return s.parser }
func ExpressionsContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

813
func (s *ExpressionsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
814
        return antlr.TreesStringTree(s, ruleNames, recog)
815
}
func ExpressionsContext.EOF
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

805
func (s *ExpressionsContext) EOF() antlr.TerminalNode {
806
        return s.GetToken(ExprParserEOF, 0)
807
}
func ExpressionListContext.AllCOMMA
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2951
func (s *ExpressionListContext) AllCOMMA() []antlr.TerminalNode {
2952
        return s.GetTokens(ExprParserCOMMA)
2953
}
func ExpressionListContext.COMMA
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2955
func (s *ExpressionListContext) COMMA(i int) antlr.TerminalNode {
2956
        return s.GetToken(ExprParserCOMMA, i)
2957
}
func ExpressionListContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2959
func (s *ExpressionListContext) GetRuleContext() antlr.RuleContext {
2960
        return s
2961
}
func ExpressionListContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2963
func (s *ExpressionListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
2964
        return antlr.TreesStringTree(s, ruleNames, recog)
2965
}
func OperandContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1837
func (s *OperandContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1838
        return antlr.TreesStringTree(s, ruleNames, recog)
1839
}
func Slice_Context.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3199
func (s *Slice_Context) GetParser() antlr.Parser { return s.parser }
func ExpressionsContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

793
func (s *ExpressionsContext) GetParser() antlr.Parser { return s.parser }
func @2983:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2983
func() {
2984
                p.ExitRule()
2985
        }
func ParamDeclContext.COLON
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

560
func (s *ParamDeclContext) COLON() antlr.TerminalNode {
561
        return s.GetToken(ExprParserCOLON, 0)
562
}
func ParamTypeContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

698
func (s *ParamTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
699
        return antlr.TreesStringTree(s, ruleNames, recog)
700
}
func ParamDeclContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

578
func (s *ParamDeclContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
579
        return antlr.TreesStringTree(s, ruleNames, recog)
580
}
func ParamTypeContext.R_BRACKET
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

690
func (s *ParamTypeContext) R_BRACKET() antlr.TerminalNode {
691
        return s.GetToken(ExprParserR_BRACKET, 0)
692
}
func CallContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3066
func (s *CallContext) GetParser() antlr.Parser { return s.parser }
func CallContext.L_PAREN
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3068
func (s *CallContext) L_PAREN() antlr.TerminalNode {
3069
        return s.GetToken(ExprParserL_PAREN, 0)
3070
}
func CallContext.R_PAREN
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3072
func (s *CallContext) R_PAREN() antlr.TerminalNode {
3073
        return s.GetToken(ExprParserR_PAREN, 0)
3074
}
func ParamTypeContext.L_BRACKET
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

686
func (s *ParamTypeContext) L_BRACKET() antlr.TerminalNode {
687
        return s.GetToken(ExprParserL_BRACKET, 0)
688
}
func CallContext.ELLIPSIS
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3086
func (s *CallContext) ELLIPSIS() antlr.TerminalNode {
3087
        return s.GetToken(ExprParserELLIPSIS, 0)
3088
}
func CallContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3090
func (s *CallContext) GetRuleContext() antlr.RuleContext {
3091
        return s
3092
}
func CallContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3094
func (s *CallContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
3095
        return antlr.TreesStringTree(s, ruleNames, recog)
3096
}
func @3114:8
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3114
func() {
3115
                p.ExitRule()
3116
        }
func Var_Context.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1946
func (s *Var_Context) GetParser() antlr.Parser { return s.parser }
func ParamTypeContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

680
func (s *ParamTypeContext) GetParser() antlr.Parser { return s.parser }
func ExpressionsContext.IsExpressionsContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

780
func (*ExpressionsContext) IsExpressionsContext() {}
func MemberContext.IsMemberContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2024
func (*MemberContext) IsMemberContext() {}
func BaseExprParserListener.ExitParamType
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

45
func (s *BaseExprParserListener) ExitParamType(ctx *ParamTypeContext) {}
func Slice_Context.IsSlice_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3186
func (*Slice_Context) IsSlice_Context() {}
func BaseExprParserListener.EnterExpressions
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

48
func (s *BaseExprParserListener) EnterExpressions(ctx *ExpressionsContext) {}
func Var_Context.IsVar_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1933
func (*Var_Context) IsVar_Context() {}
func MiscContext.IsMiscContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

885
func (*MiscContext) IsMiscContext() {}
func IndexContext.IsIndexContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2800
func (*IndexContext) IsIndexContext() {}
func ExpressionContext.IsExpressionContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1019
func (*ExpressionContext) IsExpressionContext() {}
func Float_Context.IsFloat_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2709
func (*Float_Context) IsFloat_Context() {}
func BaseExprParserListener.EnterMisc
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

54
func (s *BaseExprParserListener) EnterMisc(ctx *MiscContext) {}
func ParamDeclContext.IsParamDeclContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

541
func (*ParamDeclContext) IsParamDeclContext() {}
func ExpressionListContext.IsExpressionListContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2913
func (*ExpressionListContext) IsExpressionListContext() {}
func Nil_Context.IsNil_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2515
func (*Nil_Context) IsNil_Context() {}
func IntegerContext.IsIntegerContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2396
func (*IntegerContext) IsIntegerContext() {}
func PrimaryExprContext.IsPrimaryExprContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1450
func (*PrimaryExprContext) IsPrimaryExprContext() {}
func ParamCommaContext.IsParamCommaContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

450
func (*ParamCommaContext) IsParamCommaContext() {}
func LogicalContext.IsLogicalContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1661
func (*LogicalContext) IsLogicalContext() {}
func BasicLitContext.IsBasicLitContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2220
func (*BasicLitContext) IsBasicLitContext() {}
func OperandContext.IsOperandContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

1780
func (*OperandContext) IsOperandContext() {}
func LiteralContext.IsLiteralContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2123
func (*LiteralContext) IsLiteralContext() {}
func ParametersContext.IsParametersContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

271
func (*ParametersContext) IsParametersContext() {}
func BaseExprParserListener.VisitTerminal
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

12
func (s *BaseExprParserListener) VisitTerminal(node antlr.TerminalNode) {}
func BaseExprParserListener.VisitErrorNode
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

15
func (s *BaseExprParserListener) VisitErrorNode(node antlr.ErrorNode) {}
func BaseExprParserListener.EnterEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

18
func (s *BaseExprParserListener) EnterEveryRule(ctx antlr.ParserRuleContext) {}
func BaseExprParserListener.ExitEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

21
func (s *BaseExprParserListener) ExitEveryRule(ctx antlr.ParserRuleContext) {}
func BaseExprParserListener.EnterParameters
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

24
func (s *BaseExprParserListener) EnterParameters(ctx *ParametersContext) {}
func BaseExprParserListener.ExitParameters
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

27
func (s *BaseExprParserListener) ExitParameters(ctx *ParametersContext) {}
func BaseExprParserListener.EnterParamComma
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

30
func (s *BaseExprParserListener) EnterParamComma(ctx *ParamCommaContext) {}
func BaseExprParserListener.ExitExpressions
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

51
func (s *BaseExprParserListener) ExitExpressions(ctx *ExpressionsContext) {}
func BaseExprParserListener.EnterParamDecl
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

36
func (s *BaseExprParserListener) EnterParamDecl(ctx *ParamDeclContext) {}
func BaseExprParserListener.ExitParamDecl
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

39
func (s *BaseExprParserListener) ExitParamDecl(ctx *ParamDeclContext) {}
func BaseExprParserListener.EnterParamType
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

42
func (s *BaseExprParserListener) EnterParamType(ctx *ParamTypeContext) {}
func CallContext.IsCallContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

3053
func (*CallContext) IsCallContext() {}
func BaseExprParserListener.ExitParamComma
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

33
func (s *BaseExprParserListener) ExitParamComma(ctx *ParamCommaContext) {}
func ParamTypeContext.IsParamTypeContext
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

667
func (*ParamTypeContext) IsParamTypeContext() {}
func String_Context.IsString_Context
Back

In /Users/kun/gobatis/gobatis/parser/expr/expr_parser.go:

2606
func (*String_Context) IsString_Context() {}
func BaseExprParserListener.ExitMisc
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

57
func (s *BaseExprParserListener) ExitMisc(ctx *MiscContext) {}
func BaseExprParserListener.EnterExpression
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

60
func (s *BaseExprParserListener) EnterExpression(ctx *ExpressionContext) {}
func BaseExprParserListener.ExitExpression
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

63
func (s *BaseExprParserListener) ExitExpression(ctx *ExpressionContext) {}
func BaseExprParserListener.EnterPrimaryExpr
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

66
func (s *BaseExprParserListener) EnterPrimaryExpr(ctx *PrimaryExprContext) {}
func BaseExprParserListener.ExitPrimaryExpr
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

69
func (s *BaseExprParserListener) ExitPrimaryExpr(ctx *PrimaryExprContext) {}
func BaseExprParserListener.EnterLogical
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

72
func (s *BaseExprParserListener) EnterLogical(ctx *LogicalContext) {}
func BaseExprParserListener.ExitLogical
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

75
func (s *BaseExprParserListener) ExitLogical(ctx *LogicalContext) {}
func BaseExprParserListener.EnterOperand
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

78
func (s *BaseExprParserListener) EnterOperand(ctx *OperandContext) {}
func BaseExprParserListener.ExitOperand
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

81
func (s *BaseExprParserListener) ExitOperand(ctx *OperandContext) {}
func BaseExprParserListener.EnterVar_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

84
func (s *BaseExprParserListener) EnterVar_(ctx *Var_Context) {}
func BaseExprParserListener.ExitVar_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

87
func (s *BaseExprParserListener) ExitVar_(ctx *Var_Context) {}
func BaseExprParserListener.EnterMember
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

90
func (s *BaseExprParserListener) EnterMember(ctx *MemberContext) {}
func BaseExprParserListener.ExitMember
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

93
func (s *BaseExprParserListener) ExitMember(ctx *MemberContext) {}
func BaseExprParserListener.EnterLiteral
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

96
func (s *BaseExprParserListener) EnterLiteral(ctx *LiteralContext) {}
func BaseExprParserListener.ExitLiteral
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

99
func (s *BaseExprParserListener) ExitLiteral(ctx *LiteralContext) {}
func BaseExprParserListener.EnterBasicLit
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

102
func (s *BaseExprParserListener) EnterBasicLit(ctx *BasicLitContext) {}
func BaseExprParserListener.ExitBasicLit
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

105
func (s *BaseExprParserListener) ExitBasicLit(ctx *BasicLitContext) {}
func BaseExprParserListener.EnterInteger
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

108
func (s *BaseExprParserListener) EnterInteger(ctx *IntegerContext) {}
func BaseExprParserListener.ExitInteger
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

111
func (s *BaseExprParserListener) ExitInteger(ctx *IntegerContext) {}
func BaseExprParserListener.EnterNil_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

114
func (s *BaseExprParserListener) EnterNil_(ctx *Nil_Context) {}
func BaseExprParserListener.ExitNil_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

117
func (s *BaseExprParserListener) ExitNil_(ctx *Nil_Context) {}
func BaseExprParserListener.EnterString_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

120
func (s *BaseExprParserListener) EnterString_(ctx *String_Context) {}
func BaseExprParserListener.ExitString_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

123
func (s *BaseExprParserListener) ExitString_(ctx *String_Context) {}
func BaseExprParserListener.EnterFloat_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

126
func (s *BaseExprParserListener) EnterFloat_(ctx *Float_Context) {}
func BaseExprParserListener.ExitFloat_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

129
func (s *BaseExprParserListener) ExitFloat_(ctx *Float_Context) {}
func BaseExprParserListener.EnterIndex
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

132
func (s *BaseExprParserListener) EnterIndex(ctx *IndexContext) {}
func BaseExprParserListener.ExitIndex
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

135
func (s *BaseExprParserListener) ExitIndex(ctx *IndexContext) {}
func BaseExprParserListener.EnterExpressionList
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

138
func (s *BaseExprParserListener) EnterExpressionList(ctx *ExpressionListContext) {}
func BaseExprParserListener.ExitExpressionList
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

141
func (s *BaseExprParserListener) ExitExpressionList(ctx *ExpressionListContext) {}
func BaseExprParserListener.EnterCall
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

144
func (s *BaseExprParserListener) EnterCall(ctx *CallContext) {}
func BaseExprParserListener.ExitCall
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

147
func (s *BaseExprParserListener) ExitCall(ctx *CallContext) {}
func BaseExprParserListener.EnterSlice_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

150
func (s *BaseExprParserListener) EnterSlice_(ctx *Slice_Context) {}
func BaseExprParserListener.ExitSlice_
Back

In /Users/kun/gobatis/gobatis/parser/expr/exprparser_base_listener.go:

153
func (s *BaseExprParserListener) ExitSlice_(ctx *Slice_Context) {}
Package Overview: github.com/gobatis/gobatis/parser/simplemath 52.6%

Please select a function to see what's left for testing.

simplemathlexerLexerInit(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_lexer.go 100.0% 15/15
simplemathParserInit(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 13/13
NewSimpleMathLexer(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_lexer.go 100.0% 12/12
NewSimpleMathParser(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 10/10
NewFactorContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 5/5
NewTermContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 5/5
NewExprContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 5/5
SimpleMathParserInit(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 2/2
SimpleMathLexerInit(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_lexer.go 100.0% 2/2
SimpleMathParser.Expr(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 1/1
ExprContext.Term(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 87.5% 7/8
SimpleMathParser.expr(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 76.9% 40/52
ExprContext.Accept(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 66.7% 2/3
TermContext.Accept(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 66.7% 2/3
SimpleMathParser.Factor(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 62.5% 10/16
SimpleMathParser.term(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 42.3% 22/52
SimpleMathParser.Sempred(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/10
TermContext.Term(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/8
TermContext.Factor(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/8
ExprContext.Expr(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/8
NewEmptyExprContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/4
NewEmptyTermContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/4
NewEmptyFactorContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/4
SimpleMathParser.Expr_Sempred(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/3
FactorContext.Accept(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/3
SimpleMathParser.Term_Sempred(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/3
InitEmptyFactorContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
FactorContext.EnterRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
ExprContext.EnterRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
ExprContext.ExitRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
TermContext.ExitRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
TermContext.EnterRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
FactorContext.ExitRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
InitEmptyExprContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
InitEmptyTermContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/2
TermContext.GetParser(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
FactorContext.ToStringTree(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
BaseSimpleMathVisitor.VisitFactor(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_visitor.go 0.0% 0/1
BaseSimpleMathVisitor.VisitTerm(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_visitor.go 0.0% 0/1
BaseSimpleMathVisitor.VisitExpr(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_visitor.go 0.0% 0/1
TermContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
TermContext.ToStringTree(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
FactorContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
FactorContext.NUMBER(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
ExprContext.ToStringTree(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
SimpleMathParser.Term(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
ExprContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
FactorContext.GetParser(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
ExprContext.GetParser(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 0.0% 0/1
BaseSimpleMathListener.EnterTerm(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.VisitErrorNode(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.ExitExpr(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.VisitTerminal(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.EnterExpr(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.EnterEveryRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
FactorContext.IsFactorContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 0/0
ExprContext.IsExprContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 0/0
BaseSimpleMathListener.ExitTerm(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.EnterFactor(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.ExitFactor(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
BaseSimpleMathListener.ExitEveryRule(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go 100.0% 0/0
TermContext.IsTermContext(...) github.com/gobatis/gobatis/parser/simplemath/simplemath_parser.go 100.0% 0/0
func simplemathlexerLexerInit
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_lexer.go:

37
func simplemathlexerLexerInit() {
38
        staticData := &SimpleMathLexerLexerStaticData
39
        staticData.ChannelNames = []string{
40
                "DEFAULT_TOKEN_CHANNEL", "HIDDEN",
41
        }
42
        staticData.ModeNames = []string{
43
                "DEFAULT_MODE",
44
        }
45
        staticData.LiteralNames = []string{
46
                "", "'+'", "'*'",
47
        }
48
        staticData.SymbolicNames = []string{
49
                "", "", "", "NUMBER", "WS",
50
        }
51
        staticData.RuleNames = []string{
52
                "T__0", "T__1", "NUMBER", "WS",
53
        }
54
        staticData.PredictionContextCache = antlr.NewPredictionContextCache()
55
        staticData.serializedATN = []int32{
56
                4, 0, 4, 25, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 1,
57
                0, 1, 0, 1, 1, 1, 1, 1, 2, 4, 2, 15, 8, 2, 11, 2, 12, 2, 16, 1, 3, 4, 3,
58
                20, 8, 3, 11, 3, 12, 3, 21, 1, 3, 1, 3, 0, 0, 4, 1, 1, 3, 2, 5, 3, 7, 4,
59
                1, 0, 2, 1, 0, 48, 57, 3, 0, 9, 10, 13, 13, 32, 32, 26, 0, 1, 1, 0, 0,
60
                0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 1, 9, 1, 0, 0,
61
                0, 3, 11, 1, 0, 0, 0, 5, 14, 1, 0, 0, 0, 7, 19, 1, 0, 0, 0, 9, 10, 5, 43,
62
                0, 0, 10, 2, 1, 0, 0, 0, 11, 12, 5, 42, 0, 0, 12, 4, 1, 0, 0, 0, 13, 15,
63
                7, 0, 0, 0, 14, 13, 1, 0, 0, 0, 15, 16, 1, 0, 0, 0, 16, 14, 1, 0, 0, 0,
64
                16, 17, 1, 0, 0, 0, 17, 6, 1, 0, 0, 0, 18, 20, 7, 1, 0, 0, 19, 18, 1, 0,
65
                0, 0, 20, 21, 1, 0, 0, 0, 21, 19, 1, 0, 0, 0, 21, 22, 1, 0, 0, 0, 22, 23,
66
                1, 0, 0, 0, 23, 24, 6, 3, 0, 0, 24, 8, 1, 0, 0, 0, 3, 0, 16, 21, 1, 6,
67
                0, 0,
68
        }
69
        deserializer := antlr.NewATNDeserializer(nil)
70
        staticData.atn = deserializer.Deserialize(staticData.serializedATN)
71
        atn := staticData.atn
72
        staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState))
73
        decisionToDFA := staticData.decisionToDFA
74
        for index, state := range atn.DecisionToState {
75
                decisionToDFA[index] = antlr.NewDFA(state, index)
76
        }
77
}
func simplemathParserInit
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

32
func simplemathParserInit() {
33
        staticData := &SimpleMathParserStaticData
34
        staticData.LiteralNames = []string{
35
                "", "'+'", "'*'",
36
        }
37
        staticData.SymbolicNames = []string{
38
                "", "", "", "NUMBER", "WS",
39
        }
40
        staticData.RuleNames = []string{
41
                "expr", "term", "factor",
42
        }
43
        staticData.PredictionContextCache = antlr.NewPredictionContextCache()
44
        staticData.serializedATN = []int32{
45
                4, 1, 4, 31, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 1, 0, 1, 0, 1, 0, 1, 0,
46
                1, 0, 1, 0, 5, 0, 13, 8, 0, 10, 0, 12, 0, 16, 9, 0, 1, 1, 1, 1, 1, 1, 1,
47
                1, 1, 1, 1, 1, 5, 1, 24, 8, 1, 10, 1, 12, 1, 27, 9, 1, 1, 2, 1, 2, 1, 2,
48
                0, 2, 0, 2, 3, 0, 2, 4, 0, 0, 29, 0, 6, 1, 0, 0, 0, 2, 17, 1, 0, 0, 0,
49
                4, 28, 1, 0, 0, 0, 6, 7, 6, 0, -1, 0, 7, 8, 3, 2, 1, 0, 8, 14, 1, 0, 0,
50
                0, 9, 10, 10, 2, 0, 0, 10, 11, 5, 1, 0, 0, 11, 13, 3, 2, 1, 0, 12, 9, 1,
51
                0, 0, 0, 13, 16, 1, 0, 0, 0, 14, 12, 1, 0, 0, 0, 14, 15, 1, 0, 0, 0, 15,
52
                1, 1, 0, 0, 0, 16, 14, 1, 0, 0, 0, 17, 18, 6, 1, -1, 0, 18, 19, 3, 4, 2,
53
                0, 19, 25, 1, 0, 0, 0, 20, 21, 10, 2, 0, 0, 21, 22, 5, 2, 0, 0, 22, 24,
54
                3, 4, 2, 0, 23, 20, 1, 0, 0, 0, 24, 27, 1, 0, 0, 0, 25, 23, 1, 0, 0, 0,
55
                25, 26, 1, 0, 0, 0, 26, 3, 1, 0, 0, 0, 27, 25, 1, 0, 0, 0, 28, 29, 5, 3,
56
                0, 0, 29, 5, 1, 0, 0, 0, 2, 14, 25,
57
        }
58
        deserializer := antlr.NewATNDeserializer(nil)
59
        staticData.atn = deserializer.Deserialize(staticData.serializedATN)
60
        atn := staticData.atn
61
        staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState))
62
        decisionToDFA := staticData.decisionToDFA
63
        for index, state := range atn.DecisionToState {
64
                decisionToDFA[index] = antlr.NewDFA(state, index)
65
        }
66
}
func NewSimpleMathLexer
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_lexer.go:

89
func NewSimpleMathLexer(input antlr.CharStream) *SimpleMathLexer {
90
        SimpleMathLexerInit()
91
        l := new(SimpleMathLexer)
92
        l.BaseLexer = antlr.NewBaseLexer(input)
93
        staticData := &SimpleMathLexerLexerStaticData
94
        l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache)
95
        l.channelNames = staticData.ChannelNames
96
        l.modeNames = staticData.ModeNames
97
        l.RuleNames = staticData.RuleNames
98
        l.LiteralNames = staticData.LiteralNames
99
        l.SymbolicNames = staticData.SymbolicNames
100
        l.GrammarFileName = "SimpleMath.g4"
101
        // TODO: l.EOF = antlr.TokenEOF
102
103
        return l
104
}
func NewSimpleMathParser
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

78
func NewSimpleMathParser(input antlr.TokenStream) *SimpleMathParser {
79
        SimpleMathParserInit()
80
        this := new(SimpleMathParser)
81
        this.BaseParser = antlr.NewBaseParser(input)
82
        staticData := &SimpleMathParserStaticData
83
        this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache)
84
        this.RuleNames = staticData.RuleNames
85
        this.LiteralNames = staticData.LiteralNames
86
        this.SymbolicNames = staticData.SymbolicNames
87
        this.GrammarFileName = "SimpleMath.g4"
88
89
        return this
90
}
func NewFactorContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

525
func NewFactorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FactorContext {
526
        var p = new(FactorContext)
527
528
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
529
530
        p.parser = parser
531
        p.RuleIndex = SimpleMathParserRULE_factor
532
533
        return p
534
}
func NewTermContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

334
func NewTermContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TermContext {
335
        var p = new(TermContext)
336
337
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
338
339
        p.parser = parser
340
        p.RuleIndex = SimpleMathParserRULE_term
341
342
        return p
343
}
func NewExprContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

142
func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext {
143
        var p = new(ExprContext)
144
145
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
146
147
        p.parser = parser
148
        p.RuleIndex = SimpleMathParserRULE_expr
149
150
        return p
151
}
func SimpleMathParserInit
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

72
func SimpleMathParserInit() {
73
        staticData := &SimpleMathParserStaticData
74
        staticData.once.Do(simplemathParserInit)
75
}
func SimpleMathLexerInit
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_lexer.go:

83
func SimpleMathLexerInit() {
84
        staticData := &SimpleMathLexerLexerStaticData
85
        staticData.once.Do(simplemathlexerLexerInit)
86
}
func SimpleMathParser.Expr
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

217
func (p *SimpleMathParser) Expr() (localctx IExprContext) {
218
        return p.expr(0)
219
}
func ExprContext.Term
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

155
func (s *ExprContext) Term() ITermContext {
156
        var t antlr.RuleContext
157
        for _, ctx := range s.GetChildren() {
158
                if _, ok := ctx.(ITermContext); ok {
159
                        t = ctx.(antlr.RuleContext)
160
                        break
161
                }
162
        }
163
164
        if t == nil {
165
                return nil
166
        }
167
168
        return t.(ITermContext)
169
}
func SimpleMathParser.expr
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

221
func (p *SimpleMathParser) expr(_p int) (localctx IExprContext) {
222
        var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
223
224
        _parentState := p.GetState()
225
        localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState)
226
        var _prevctx IExprContext = localctx
227
        var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
228
        _startState := 0
229
        p.EnterRecursionRule(localctx, 0, SimpleMathParserRULE_expr, _p)
230
        var _alt int
231
232
        p.EnterOuterAlt(localctx, 1)
233
        {
234
                p.SetState(7)
235
                p.term(0)
236
        }
237
238
        p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
239
        p.SetState(14)
240
        p.GetErrorHandler().Sync(p)
241
        if p.HasError() {
242
                goto errorExit
243
        }
244
        _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 0, p.GetParserRuleContext())
245
        if p.HasError() {
246
                goto errorExit
247
        }
248
        for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
249
                if _alt == 1 {
250
                        if p.GetParseListeners() != nil {
251
                                p.TriggerExitRuleEvent()
252
                        }
253
                        _prevctx = localctx
254
                        localctx = NewExprContext(p, _parentctx, _parentState)
255
                        p.PushNewRecursionContext(localctx, _startState, SimpleMathParserRULE_expr)
256
                        p.SetState(9)
257
258
                        if !(p.Precpred(p.GetParserRuleContext(), 2)) {
259
                                p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", ""))
260
                                goto errorExit
261
                        }
262
                        {
263
                                p.SetState(10)
264
                                p.Match(SimpleMathParserT__0)
265
                                if p.HasError() {
266
                                        // Recognition error - abort rule
267
                                        goto errorExit
268
                                }
269
                        }
270
                        {
271
                                p.SetState(11)
272
                                p.term(0)
273
                        }
274
275
                }
276
                p.SetState(16)
277
                p.GetErrorHandler().Sync(p)
278
                if p.HasError() {
279
                        goto errorExit
280
                }
281
                _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 0, p.GetParserRuleContext())
282
                if p.HasError() {
283
                        goto errorExit
284
                }
285
        }
286
287
errorExit:
288
        if p.HasError() {
289
                v := p.GetError()
290
                localctx.SetException(v)
291
                p.GetErrorHandler().ReportError(p, v)
292
                p.GetErrorHandler().Recover(p, v)
293
                p.SetError(nil)
294
        }
295
        p.UnrollRecursionContexts(_parentctx)
296
        return localctx
297
        goto errorExit // Trick to prevent compiler error if the label is not used
298
}
func ExprContext.Accept
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

207
func (s *ExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
208
        switch t := visitor.(type) {
209
        case SimpleMathVisitor:
210
                return t.VisitExpr(s)
211
212
        default:
213
                return t.VisitChildren(s)
214
        }
215
}
func TermContext.Accept
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

399
func (s *TermContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
400
        switch t := visitor.(type) {
401
        case SimpleMathVisitor:
402
                return t.VisitTerm(s)
403
404
        default:
405
                return t.VisitChildren(s)
406
        }
407
}
func SimpleMathParser.Factor
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

572
func (p *SimpleMathParser) Factor() (localctx IFactorContext) {
573
        localctx = NewFactorContext(p, p.GetParserRuleContext(), p.GetState())
574
        p.EnterRule(localctx, 4, SimpleMathParserRULE_factor)
575
        p.EnterOuterAlt(localctx, 1)
576
        {
577
                p.SetState(28)
578
                p.Match(SimpleMathParserNUMBER)
579
                if p.HasError() {
580
                        // Recognition error - abort rule
581
                        goto errorExit
582
                }
583
        }
584
585
errorExit:
586
        if p.HasError() {
587
                v := p.GetError()
588
                localctx.SetException(v)
589
                p.GetErrorHandler().ReportError(p, v)
590
                p.GetErrorHandler().Recover(p, v)
591
                p.SetError(nil)
592
        }
593
        p.ExitRule()
594
        return localctx
595
        goto errorExit // Trick to prevent compiler error if the label is not used
596
}
func SimpleMathParser.term
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

413
func (p *SimpleMathParser) term(_p int) (localctx ITermContext) {
414
        var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
415
416
        _parentState := p.GetState()
417
        localctx = NewTermContext(p, p.GetParserRuleContext(), _parentState)
418
        var _prevctx ITermContext = localctx
419
        var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
420
        _startState := 2
421
        p.EnterRecursionRule(localctx, 2, SimpleMathParserRULE_term, _p)
422
        var _alt int
423
424
        p.EnterOuterAlt(localctx, 1)
425
        {
426
                p.SetState(18)
427
                p.Factor()
428
        }
429
430
        p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
431
        p.SetState(25)
432
        p.GetErrorHandler().Sync(p)
433
        if p.HasError() {
434
                goto errorExit
435
        }
436
        _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 1, p.GetParserRuleContext())
437
        if p.HasError() {
438
                goto errorExit
439
        }
440
        for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
441
                if _alt == 1 {
442
                        if p.GetParseListeners() != nil {
443
                                p.TriggerExitRuleEvent()
444
                        }
445
                        _prevctx = localctx
446
                        localctx = NewTermContext(p, _parentctx, _parentState)
447
                        p.PushNewRecursionContext(localctx, _startState, SimpleMathParserRULE_term)
448
                        p.SetState(20)
449
450
                        if !(p.Precpred(p.GetParserRuleContext(), 2)) {
451
                                p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", ""))
452
                                goto errorExit
453
                        }
454
                        {
455
                                p.SetState(21)
456
                                p.Match(SimpleMathParserT__1)
457
                                if p.HasError() {
458
                                        // Recognition error - abort rule
459
                                        goto errorExit
460
                                }
461
                        }
462
                        {
463
                                p.SetState(22)
464
                                p.Factor()
465
                        }
466
467
                }
468
                p.SetState(27)
469
                p.GetErrorHandler().Sync(p)
470
                if p.HasError() {
471
                        goto errorExit
472
                }
473
                _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 1, p.GetParserRuleContext())
474
                if p.HasError() {
475
                        goto errorExit
476
                }
477
        }
478
479
errorExit:
480
        if p.HasError() {
481
                v := p.GetError()
482
                localctx.SetException(v)
483
                p.GetErrorHandler().ReportError(p, v)
484
                p.GetErrorHandler().Recover(p, v)
485
                p.SetError(nil)
486
        }
487
        p.UnrollRecursionContexts(_parentctx)
488
        return localctx
489
        goto errorExit // Trick to prevent compiler error if the label is not used
490
}
func SimpleMathParser.Sempred
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

598
func (p *SimpleMathParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
599
        switch ruleIndex {
600
        case 0:
601
                var t *ExprContext = nil
602
                if localctx != nil {
603
                        t = localctx.(*ExprContext)
604
                }
605
                return p.Expr_Sempred(t, predIndex)
606
607
        case 1:
608
                var t *TermContext = nil
609
                if localctx != nil {
610
                        t = localctx.(*TermContext)
611
                }
612
                return p.Term_Sempred(t, predIndex)
613
614
        default:
615
                panic("No predicate with index: " + fmt.Sprint(ruleIndex))
616
        }
617
}
func TermContext.Term
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

363
func (s *TermContext) Term() ITermContext {
364
        var t antlr.RuleContext
365
        for _, ctx := range s.GetChildren() {
366
                if _, ok := ctx.(ITermContext); ok {
367
                        t = ctx.(antlr.RuleContext)
368
                        break
369
                }
370
        }
371
372
        if t == nil {
373
                return nil
374
        }
375
376
        return t.(ITermContext)
377
}
func TermContext.Factor
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

347
func (s *TermContext) Factor() IFactorContext {
348
        var t antlr.RuleContext
349
        for _, ctx := range s.GetChildren() {
350
                if _, ok := ctx.(IFactorContext); ok {
351
                        t = ctx.(antlr.RuleContext)
352
                        break
353
                }
354
        }
355
356
        if t == nil {
357
                return nil
358
        }
359
360
        return t.(IFactorContext)
361
}
func ExprContext.Expr
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

171
func (s *ExprContext) Expr() IExprContext {
172
        var t antlr.RuleContext
173
        for _, ctx := range s.GetChildren() {
174
                if _, ok := ctx.(IExprContext); ok {
175
                        t = ctx.(antlr.RuleContext)
176
                        break
177
                }
178
        }
179
180
        if t == nil {
181
                return nil
182
        }
183
184
        return t.(IExprContext)
185
}
func NewEmptyExprContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

128
func NewEmptyExprContext() *ExprContext {
129
        var p = new(ExprContext)
130
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
131
        p.RuleIndex = SimpleMathParserRULE_expr
132
        return p
133
}
func NewEmptyTermContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

320
func NewEmptyTermContext() *TermContext {
321
        var p = new(TermContext)
322
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
323
        p.RuleIndex = SimpleMathParserRULE_term
324
        return p
325
}
func NewEmptyFactorContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

511
func NewEmptyFactorContext() *FactorContext {
512
        var p = new(FactorContext)
513
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
514
        p.RuleIndex = SimpleMathParserRULE_factor
515
        return p
516
}
func SimpleMathParser.Expr_Sempred
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

619
func (p *SimpleMathParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool {
620
        switch predIndex {
621
        case 0:
622
                return p.Precpred(p.GetParserRuleContext(), 2)
623
624
        default:
625
                panic("No predicate with index: " + fmt.Sprint(predIndex))
626
        }
627
}
func FactorContext.Accept
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

562
func (s *FactorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
563
        switch t := visitor.(type) {
564
        case SimpleMathVisitor:
565
                return t.VisitFactor(s)
566
567
        default:
568
                return t.VisitChildren(s)
569
        }
570
}
func SimpleMathParser.Term_Sempred
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

629
func (p *SimpleMathParser) Term_Sempred(localctx antlr.RuleContext, predIndex int) bool {
630
        switch predIndex {
631
        case 1:
632
                return p.Precpred(p.GetParserRuleContext(), 2)
633
634
        default:
635
                panic("No predicate with index: " + fmt.Sprint(predIndex))
636
        }
637
}
func InitEmptyFactorContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

518
func InitEmptyFactorContext(p *FactorContext) {
519
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
520
        p.RuleIndex = SimpleMathParserRULE_factor
521
}
func FactorContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

550
func (s *FactorContext) EnterRule(listener antlr.ParseTreeListener) {
551
        if listenerT, ok := listener.(SimpleMathListener); ok {
552
                listenerT.EnterFactor(s)
553
        }
554
}
func ExprContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

195
func (s *ExprContext) EnterRule(listener antlr.ParseTreeListener) {
196
        if listenerT, ok := listener.(SimpleMathListener); ok {
197
                listenerT.EnterExpr(s)
198
        }
199
}
func ExprContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

201
func (s *ExprContext) ExitRule(listener antlr.ParseTreeListener) {
202
        if listenerT, ok := listener.(SimpleMathListener); ok {
203
                listenerT.ExitExpr(s)
204
        }
205
}
func TermContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

393
func (s *TermContext) ExitRule(listener antlr.ParseTreeListener) {
394
        if listenerT, ok := listener.(SimpleMathListener); ok {
395
                listenerT.ExitTerm(s)
396
        }
397
}
func TermContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

387
func (s *TermContext) EnterRule(listener antlr.ParseTreeListener) {
388
        if listenerT, ok := listener.(SimpleMathListener); ok {
389
                listenerT.EnterTerm(s)
390
        }
391
}
func FactorContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

556
func (s *FactorContext) ExitRule(listener antlr.ParseTreeListener) {
557
        if listenerT, ok := listener.(SimpleMathListener); ok {
558
                listenerT.ExitFactor(s)
559
        }
560
}
func InitEmptyExprContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

135
func InitEmptyExprContext(p *ExprContext) {
136
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
137
        p.RuleIndex = SimpleMathParserRULE_expr
138
}
func InitEmptyTermContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

327
func InitEmptyTermContext(p *TermContext) {
328
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
329
        p.RuleIndex = SimpleMathParserRULE_term
330
}
func TermContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

345
func (s *TermContext) GetParser() antlr.Parser { return s.parser }
func FactorContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

546
func (s *FactorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
547
        return antlr.TreesStringTree(s, ruleNames, recog)
548
}
func BaseSimpleMathVisitor.VisitFactor
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_visitor.go:

18
func (v *BaseSimpleMathVisitor) VisitFactor(ctx *FactorContext) interface{} {
19
        return v.VisitChildren(ctx)
20
}
func BaseSimpleMathVisitor.VisitTerm
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_visitor.go:

14
func (v *BaseSimpleMathVisitor) VisitTerm(ctx *TermContext) interface{} {
15
        return v.VisitChildren(ctx)
16
}
func BaseSimpleMathVisitor.VisitExpr
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_visitor.go:

10
func (v *BaseSimpleMathVisitor) VisitExpr(ctx *ExprContext) interface{} {
11
        return v.VisitChildren(ctx)
12
}
func TermContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

379
func (s *TermContext) GetRuleContext() antlr.RuleContext {
380
        return s
381
}
func TermContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

383
func (s *TermContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
384
        return antlr.TreesStringTree(s, ruleNames, recog)
385
}
func FactorContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

542
func (s *FactorContext) GetRuleContext() antlr.RuleContext {
543
        return s
544
}
func FactorContext.NUMBER
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

538
func (s *FactorContext) NUMBER() antlr.TerminalNode {
539
        return s.GetToken(SimpleMathParserNUMBER, 0)
540
}
func ExprContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

191
func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
192
        return antlr.TreesStringTree(s, ruleNames, recog)
193
}
func SimpleMathParser.Term
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

409
func (p *SimpleMathParser) Term() (localctx ITermContext) {
410
        return p.term(0)
411
}
func ExprContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

187
func (s *ExprContext) GetRuleContext() antlr.RuleContext {
188
        return s
189
}
func FactorContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

536
func (s *FactorContext) GetParser() antlr.Parser { return s.parser }
func ExprContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

153
func (s *ExprContext) GetParser() antlr.Parser { return s.parser }
func BaseSimpleMathListener.EnterTerm
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

30
func (s *BaseSimpleMathListener) EnterTerm(ctx *TermContext) {}
func BaseSimpleMathListener.VisitErrorNode
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

15
func (s *BaseSimpleMathListener) VisitErrorNode(node antlr.ErrorNode) {}
func BaseSimpleMathListener.ExitExpr
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

27
func (s *BaseSimpleMathListener) ExitExpr(ctx *ExprContext) {}
func BaseSimpleMathListener.VisitTerminal
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

12
func (s *BaseSimpleMathListener) VisitTerminal(node antlr.TerminalNode) {}
func BaseSimpleMathListener.EnterExpr
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

24
func (s *BaseSimpleMathListener) EnterExpr(ctx *ExprContext) {}
func BaseSimpleMathListener.EnterEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

18
func (s *BaseSimpleMathListener) EnterEveryRule(ctx antlr.ParserRuleContext) {}
func FactorContext.IsFactorContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

523
func (*FactorContext) IsFactorContext() {}
func ExprContext.IsExprContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

140
func (*ExprContext) IsExprContext() {}
func BaseSimpleMathListener.ExitTerm
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

33
func (s *BaseSimpleMathListener) ExitTerm(ctx *TermContext) {}
func BaseSimpleMathListener.EnterFactor
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

36
func (s *BaseSimpleMathListener) EnterFactor(ctx *FactorContext) {}
func BaseSimpleMathListener.ExitFactor
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

39
func (s *BaseSimpleMathListener) ExitFactor(ctx *FactorContext) {}
func BaseSimpleMathListener.ExitEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_base_listener.go:

21
func (s *BaseSimpleMathListener) ExitEveryRule(ctx antlr.ParserRuleContext) {}
func TermContext.IsTermContext
Back

In /Users/kun/gobatis/gobatis/parser/simplemath/simplemath_parser.go:

332
func (*TermContext) IsTermContext() {}
Package Overview: github.com/gobatis/gobatis/parser/structpath 45.2%

Please select a function to see what's left for testing.

jsonpathlexerLexerInit(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_lexer.go 100.0% 15/15
jsonpathParserInit(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 13/13
NewJsonPathLexer(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_lexer.go 100.0% 12/12
NewJsonPathParser(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 10/10
NewIdentifierWithQualifierContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 5/5
NewDotnotation_exprContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 5/5
NewJsonpathContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 5/5
NewDotnotationContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 5/5
JsonPathParserInit(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 2/2
JsonPathLexerInit(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_lexer.go 100.0% 2/2
JsonPathParser.IdentifierWithQualifier(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 65.0% 13/20
JsonPathParser.Jsonpath(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 64.3% 9/14
JsonPathParser.Dotnotation_expr(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 52.0% 13/25
JsonPathParser.Dotnotation(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 46.3% 19/41
DotnotationContext.AllDotnotation_expr(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/12
DotnotationContext.Dotnotation_expr(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/11
JsonpathContext.Dotnotation(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/8
Dotnotation_exprContext.IdentifierWithQualifier(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/8
NewEmptyDotnotationContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/4
NewEmptyDotnotation_exprContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/4
NewEmptyJsonpathContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/4
NewEmptyIdentifierWithQualifierContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/4
DotnotationContext.Accept(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/3
Dotnotation_exprContext.Accept(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/3
JsonpathContext.Accept(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/3
IdentifierWithQualifierContext.Accept(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/3
InitEmptyDotnotationContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
DotnotationContext.EnterRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
Dotnotation_exprContext.ExitRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
InitEmptyIdentifierWithQualifierContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
JsonpathContext.EnterRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
JsonpathContext.ExitRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
IdentifierWithQualifierContext.ExitRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
InitEmptyJsonpathContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
Dotnotation_exprContext.EnterRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
IdentifierWithQualifierContext.EnterRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
InitEmptyDotnotation_exprContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
DotnotationContext.ExitRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/2
BaseJsonPathVisitor.VisitIdentifierWithQualifier(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go 0.0% 0/1
IdentifierWithQualifierContext.GetParser(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
BaseJsonPathVisitor.VisitJsonpath(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go 0.0% 0/1
DotnotationContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
DotnotationContext.ToStringTree(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
DotnotationContext.GetParser(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
BaseJsonPathVisitor.VisitDotnotation_expr(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go 0.0% 0/1
IdentifierWithQualifierContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
IdentifierWithQualifierContext.INDENTIFIER(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
BaseJsonPathVisitor.VisitDotnotation(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go 0.0% 0/1
IdentifierWithQualifierContext.ToStringTree(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
JsonpathContext.GetParser(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
JsonpathContext.ToStringTree(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
Dotnotation_exprContext.GetParser(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
JsonpathContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
Dotnotation_exprContext.INDENTIFIER(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
Dotnotation_exprContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
Dotnotation_exprContext.ToStringTree(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 0.0% 0/1
Dotnotation_exprContext.IsDotnotation_exprContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 0/0
BaseJsonPathListener.ExitDotnotation(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.EnterDotnotation(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.ExitJsonpath(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.EnterJsonpath(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.EnterDotnotation_expr(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
IdentifierWithQualifierContext.IsIdentifierWithQualifierContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 0/0
BaseJsonPathListener.ExitEveryRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.ExitDotnotation_expr(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.EnterIdentifierWithQualifier(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.ExitIdentifierWithQualifier(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
DotnotationContext.IsDotnotationContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 0/0
BaseJsonPathListener.VisitTerminal(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
JsonpathContext.IsJsonpathContext(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_parser.go 100.0% 0/0
BaseJsonPathListener.EnterEveryRule(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
BaseJsonPathListener.VisitErrorNode(...) github.com/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go 100.0% 0/0
func jsonpathlexerLexerInit
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_lexer.go:

38
func jsonpathlexerLexerInit() {
39
        staticData := &JsonPathLexerLexerStaticData
40
        staticData.ChannelNames = []string{
41
                "DEFAULT_TOKEN_CHANNEL", "HIDDEN",
42
        }
43
        staticData.ModeNames = []string{
44
                "DEFAULT_MODE",
45
        }
46
        staticData.LiteralNames = []string{
47
                "", "'$.'", "'.'", "'[*]'",
48
        }
49
        staticData.SymbolicNames = []string{
50
                "", "", "", "", "INDENTIFIER", "WS",
51
        }
52
        staticData.RuleNames = []string{
53
                "T__0", "T__1", "T__2", "INDENTIFIER", "WS",
54
        }
55
        staticData.PredictionContextCache = antlr.NewPredictionContextCache()
56
        staticData.serializedATN = []int32{
57
                4, 0, 5, 34, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2,
58
                4, 7, 4, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1,
59
                3, 5, 3, 23, 8, 3, 10, 3, 12, 3, 26, 9, 3, 1, 4, 4, 4, 29, 8, 4, 11, 4,
60
                12, 4, 30, 1, 4, 1, 4, 0, 0, 5, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 1, 0, 3,
61
                2, 0, 65, 90, 97, 122, 3, 0, 48, 57, 65, 90, 97, 122, 3, 0, 9, 10, 13,
62
                13, 32, 32, 35, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0,
63
                7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 1, 11, 1, 0, 0, 0, 3, 14, 1, 0, 0, 0,
64
                5, 16, 1, 0, 0, 0, 7, 20, 1, 0, 0, 0, 9, 28, 1, 0, 0, 0, 11, 12, 5, 36,
65
                0, 0, 12, 13, 5, 46, 0, 0, 13, 2, 1, 0, 0, 0, 14, 15, 5, 46, 0, 0, 15,
66
                4, 1, 0, 0, 0, 16, 17, 5, 91, 0, 0, 17, 18, 5, 42, 0, 0, 18, 19, 5, 93,
67
                0, 0, 19, 6, 1, 0, 0, 0, 20, 24, 7, 0, 0, 0, 21, 23, 7, 1, 0, 0, 22, 21,
68
                1, 0, 0, 0, 23, 26, 1, 0, 0, 0, 24, 22, 1, 0, 0, 0, 24, 25, 1, 0, 0, 0,
69
                25, 8, 1, 0, 0, 0, 26, 24, 1, 0, 0, 0, 27, 29, 7, 2, 0, 0, 28, 27, 1, 0,
70
                0, 0, 29, 30, 1, 0, 0, 0, 30, 28, 1, 0, 0, 0, 30, 31, 1, 0, 0, 0, 31, 32,
71
                1, 0, 0, 0, 32, 33, 6, 4, 0, 0, 33, 10, 1, 0, 0, 0, 3, 0, 24, 30, 1, 6,
72
                0, 0,
73
        }
74
        deserializer := antlr.NewATNDeserializer(nil)
75
        staticData.atn = deserializer.Deserialize(staticData.serializedATN)
76
        atn := staticData.atn
77
        staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState))
78
        decisionToDFA := staticData.decisionToDFA
79
        for index, state := range atn.DecisionToState {
80
                decisionToDFA[index] = antlr.NewDFA(state, index)
81
        }
82
}
func jsonpathParserInit
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

32
func jsonpathParserInit() {
33
        staticData := &JsonPathParserStaticData
34
        staticData.LiteralNames = []string{
35
                "", "'$.'", "'.'", "'[*]'",
36
        }
37
        staticData.SymbolicNames = []string{
38
                "", "", "", "", "INDENTIFIER", "WS",
39
        }
40
        staticData.RuleNames = []string{
41
                "jsonpath", "dotnotation", "dotnotation_expr", "identifierWithQualifier",
42
        }
43
        staticData.PredictionContextCache = antlr.NewPredictionContextCache()
44
        staticData.serializedATN = []int32{
45
                4, 1, 5, 27, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 1, 0, 1, 0,
46
                1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 15, 8, 1, 10, 1, 12, 1, 18, 9, 1, 1, 2, 1,
47
                2, 3, 2, 22, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 0, 0, 4, 0, 2, 4, 6, 0, 0, 24,
48
                0, 8, 1, 0, 0, 0, 2, 10, 1, 0, 0, 0, 4, 21, 1, 0, 0, 0, 6, 23, 1, 0, 0,
49
                0, 8, 9, 3, 2, 1, 0, 9, 1, 1, 0, 0, 0, 10, 11, 5, 1, 0, 0, 11, 16, 3, 4,
50
                2, 0, 12, 13, 5, 2, 0, 0, 13, 15, 3, 4, 2, 0, 14, 12, 1, 0, 0, 0, 15, 18,
51
                1, 0, 0, 0, 16, 14, 1, 0, 0, 0, 16, 17, 1, 0, 0, 0, 17, 3, 1, 0, 0, 0,
52
                18, 16, 1, 0, 0, 0, 19, 22, 3, 6, 3, 0, 20, 22, 5, 4, 0, 0, 21, 19, 1,
53
                0, 0, 0, 21, 20, 1, 0, 0, 0, 22, 5, 1, 0, 0, 0, 23, 24, 5, 4, 0, 0, 24,
54
                25, 5, 3, 0, 0, 25, 7, 1, 0, 0, 0, 2, 16, 21,
55
        }
56
        deserializer := antlr.NewATNDeserializer(nil)
57
        staticData.atn = deserializer.Deserialize(staticData.serializedATN)
58
        atn := staticData.atn
59
        staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState))
60
        decisionToDFA := staticData.decisionToDFA
61
        for index, state := range atn.DecisionToState {
62
                decisionToDFA[index] = antlr.NewDFA(state, index)
63
        }
64
}
func NewJsonPathLexer
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_lexer.go:

94
func NewJsonPathLexer(input antlr.CharStream) *JsonPathLexer {
95
        JsonPathLexerInit()
96
        l := new(JsonPathLexer)
97
        l.BaseLexer = antlr.NewBaseLexer(input)
98
        staticData := &JsonPathLexerLexerStaticData
99
        l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache)
100
        l.channelNames = staticData.ChannelNames
101
        l.modeNames = staticData.ModeNames
102
        l.RuleNames = staticData.RuleNames
103
        l.LiteralNames = staticData.LiteralNames
104
        l.SymbolicNames = staticData.SymbolicNames
105
        l.GrammarFileName = "JsonPath.g4"
106
        // TODO: l.EOF = antlr.TokenEOF
107
108
        return l
109
}
func NewJsonPathParser
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

76
func NewJsonPathParser(input antlr.TokenStream) *JsonPathParser {
77
        JsonPathParserInit()
78
        this := new(JsonPathParser)
79
        this.BaseParser = antlr.NewBaseParser(input)
80
        staticData := &JsonPathParserStaticData
81
        this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache)
82
        this.RuleNames = staticData.RuleNames
83
        this.LiteralNames = staticData.LiteralNames
84
        this.SymbolicNames = staticData.SymbolicNames
85
        this.GrammarFileName = "JsonPath.g4"
86
87
        return this
88
}
func NewIdentifierWithQualifierContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

582
func NewIdentifierWithQualifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IdentifierWithQualifierContext {
583
        var p = new(IdentifierWithQualifierContext)
584
585
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
586
587
        p.parser = parser
588
        p.RuleIndex = JsonPathParserRULE_identifierWithQualifier
589
590
        return p
591
}
func NewDotnotation_exprContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

441
func NewDotnotation_exprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Dotnotation_exprContext {
442
        var p = new(Dotnotation_exprContext)
443
444
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
445
446
        p.parser = parser
447
        p.RuleIndex = JsonPathParserRULE_dotnotation_expr
448
449
        return p
450
}
func NewJsonpathContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

141
func NewJsonpathContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonpathContext {
142
        var p = new(JsonpathContext)
143
144
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
145
146
        p.parser = parser
147
        p.RuleIndex = JsonPathParserRULE_jsonpath
148
149
        return p
150
}
func NewDotnotationContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

256
func NewDotnotationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DotnotationContext {
257
        var p = new(DotnotationContext)
258
259
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
260
261
        p.parser = parser
262
        p.RuleIndex = JsonPathParserRULE_dotnotation
263
264
        return p
265
}
func JsonPathParserInit
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

70
func JsonPathParserInit() {
71
        staticData := &JsonPathParserStaticData
72
        staticData.once.Do(jsonpathParserInit)
73
}
func JsonPathLexerInit
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_lexer.go:

88
func JsonPathLexerInit() {
89
        staticData := &JsonPathLexerLexerStaticData
90
        staticData.once.Do(jsonpathlexerLexerInit)
91
}
func JsonPathParser.IdentifierWithQualifier
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

629
func (p *JsonPathParser) IdentifierWithQualifier() (localctx IIdentifierWithQualifierContext) {
630
        localctx = NewIdentifierWithQualifierContext(p, p.GetParserRuleContext(), p.GetState())
631
        p.EnterRule(localctx, 6, JsonPathParserRULE_identifierWithQualifier)
632
        p.EnterOuterAlt(localctx, 1)
633
        {
634
                p.SetState(23)
635
                p.Match(JsonPathParserINDENTIFIER)
636
                if p.HasError() {
637
                        // Recognition error - abort rule
638
                        goto errorExit
639
                }
640
        }
641
        {
642
                p.SetState(24)
643
                p.Match(JsonPathParserT__2)
644
                if p.HasError() {
645
                        // Recognition error - abort rule
646
                        goto errorExit
647
                }
648
        }
649
650
errorExit:
651
        if p.HasError() {
652
                v := p.GetError()
653
                localctx.SetException(v)
654
                p.GetErrorHandler().ReportError(p, v)
655
                p.GetErrorHandler().Recover(p, v)
656
                p.SetError(nil)
657
        }
658
        p.ExitRule()
659
        return localctx
660
        goto errorExit // Trick to prevent compiler error if the label is not used
661
}
func JsonPathParser.Jsonpath
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

200
func (p *JsonPathParser) Jsonpath() (localctx IJsonpathContext) {
201
        localctx = NewJsonpathContext(p, p.GetParserRuleContext(), p.GetState())
202
        p.EnterRule(localctx, 0, JsonPathParserRULE_jsonpath)
203
        p.EnterOuterAlt(localctx, 1)
204
        {
205
                p.SetState(8)
206
                p.Dotnotation()
207
        }
208
209
errorExit:
210
        if p.HasError() {
211
                v := p.GetError()
212
                localctx.SetException(v)
213
                p.GetErrorHandler().ReportError(p, v)
214
                p.GetErrorHandler().Recover(p, v)
215
                p.SetError(nil)
216
        }
217
        p.ExitRule()
218
        return localctx
219
        goto errorExit // Trick to prevent compiler error if the label is not used
220
}
func JsonPathParser.Dotnotation_expr
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

504
func (p *JsonPathParser) Dotnotation_expr() (localctx IDotnotation_exprContext) {
505
        localctx = NewDotnotation_exprContext(p, p.GetParserRuleContext(), p.GetState())
506
        p.EnterRule(localctx, 4, JsonPathParserRULE_dotnotation_expr)
507
        p.SetState(21)
508
        p.GetErrorHandler().Sync(p)
509
        if p.HasError() {
510
                goto errorExit
511
        }
512
513
        switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 1, p.GetParserRuleContext()) {
514
        case 1:
515
                p.EnterOuterAlt(localctx, 1)
516
                {
517
                        p.SetState(19)
518
                        p.IdentifierWithQualifier()
519
                }
520
521
        case 2:
522
                p.EnterOuterAlt(localctx, 2)
523
                {
524
                        p.SetState(20)
525
                        p.Match(JsonPathParserINDENTIFIER)
526
                        if p.HasError() {
527
                                // Recognition error - abort rule
528
                                goto errorExit
529
                        }
530
                }
531
532
        case antlr.ATNInvalidAltNumber:
533
                goto errorExit
534
        }
535
536
errorExit:
537
        if p.HasError() {
538
                v := p.GetError()
539
                localctx.SetException(v)
540
                p.GetErrorHandler().ReportError(p, v)
541
                p.GetErrorHandler().Recover(p, v)
542
                p.SetError(nil)
543
        }
544
        p.ExitRule()
545
        return localctx
546
        goto errorExit // Trick to prevent compiler error if the label is not used
547
}
func JsonPathParser.Dotnotation
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

340
func (p *JsonPathParser) Dotnotation() (localctx IDotnotationContext) {
341
        localctx = NewDotnotationContext(p, p.GetParserRuleContext(), p.GetState())
342
        p.EnterRule(localctx, 2, JsonPathParserRULE_dotnotation)
343
        var _alt int
344
345
        p.EnterOuterAlt(localctx, 1)
346
        {
347
                p.SetState(10)
348
                p.Match(JsonPathParserT__0)
349
                if p.HasError() {
350
                        // Recognition error - abort rule
351
                        goto errorExit
352
                }
353
        }
354
        {
355
                p.SetState(11)
356
                p.Dotnotation_expr()
357
        }
358
        p.SetState(16)
359
        p.GetErrorHandler().Sync(p)
360
        if p.HasError() {
361
                goto errorExit
362
        }
363
        _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 0, p.GetParserRuleContext())
364
        if p.HasError() {
365
                goto errorExit
366
        }
367
        for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
368
                if _alt == 1 {
369
                        {
370
                                p.SetState(12)
371
                                p.Match(JsonPathParserT__1)
372
                                if p.HasError() {
373
                                        // Recognition error - abort rule
374
                                        goto errorExit
375
                                }
376
                        }
377
                        {
378
                                p.SetState(13)
379
                                p.Dotnotation_expr()
380
                        }
381
382
                }
383
                p.SetState(18)
384
                p.GetErrorHandler().Sync(p)
385
                if p.HasError() {
386
                        goto errorExit
387
                }
388
                _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 0, p.GetParserRuleContext())
389
                if p.HasError() {
390
                        goto errorExit
391
                }
392
        }
393
394
errorExit:
395
        if p.HasError() {
396
                v := p.GetError()
397
                localctx.SetException(v)
398
                p.GetErrorHandler().ReportError(p, v)
399
                p.GetErrorHandler().Recover(p, v)
400
                p.SetError(nil)
401
        }
402
        p.ExitRule()
403
        return localctx
404
        goto errorExit // Trick to prevent compiler error if the label is not used
405
}
func DotnotationContext.AllDotnotation_expr
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

269
func (s *DotnotationContext) AllDotnotation_expr() []IDotnotation_exprContext {
270
        children := s.GetChildren()
271
        len := 0
272
        for _, ctx := range children {
273
                if _, ok := ctx.(IDotnotation_exprContext); ok {
274
                        len++
275
                }
276
        }
277
278
        tst := make([]IDotnotation_exprContext, len)
279
        i := 0
280
        for _, ctx := range children {
281
                if t, ok := ctx.(IDotnotation_exprContext); ok {
282
                        tst[i] = t.(IDotnotation_exprContext)
283
                        i++
284
                }
285
        }
286
287
        return tst
288
}
func DotnotationContext.Dotnotation_expr
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

290
func (s *DotnotationContext) Dotnotation_expr(i int) IDotnotation_exprContext {
291
        var t antlr.RuleContext
292
        j := 0
293
        for _, ctx := range s.GetChildren() {
294
                if _, ok := ctx.(IDotnotation_exprContext); ok {
295
                        if j == i {
296
                                t = ctx.(antlr.RuleContext)
297
                                break
298
                        }
299
                        j++
300
                }
301
        }
302
303
        if t == nil {
304
                return nil
305
        }
306
307
        return t.(IDotnotation_exprContext)
308
}
func JsonpathContext.Dotnotation
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

154
func (s *JsonpathContext) Dotnotation() IDotnotationContext {
155
        var t antlr.RuleContext
156
        for _, ctx := range s.GetChildren() {
157
                if _, ok := ctx.(IDotnotationContext); ok {
158
                        t = ctx.(antlr.RuleContext)
159
                        break
160
                }
161
        }
162
163
        if t == nil {
164
                return nil
165
        }
166
167
        return t.(IDotnotationContext)
168
}
func Dotnotation_exprContext.IdentifierWithQualifier
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

454
func (s *Dotnotation_exprContext) IdentifierWithQualifier() IIdentifierWithQualifierContext {
455
        var t antlr.RuleContext
456
        for _, ctx := range s.GetChildren() {
457
                if _, ok := ctx.(IIdentifierWithQualifierContext); ok {
458
                        t = ctx.(antlr.RuleContext)
459
                        break
460
                }
461
        }
462
463
        if t == nil {
464
                return nil
465
        }
466
467
        return t.(IIdentifierWithQualifierContext)
468
}
func NewEmptyDotnotationContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

242
func NewEmptyDotnotationContext() *DotnotationContext {
243
        var p = new(DotnotationContext)
244
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
245
        p.RuleIndex = JsonPathParserRULE_dotnotation
246
        return p
247
}
func NewEmptyDotnotation_exprContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

427
func NewEmptyDotnotation_exprContext() *Dotnotation_exprContext {
428
        var p = new(Dotnotation_exprContext)
429
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
430
        p.RuleIndex = JsonPathParserRULE_dotnotation_expr
431
        return p
432
}
func NewEmptyJsonpathContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

127
func NewEmptyJsonpathContext() *JsonpathContext {
128
        var p = new(JsonpathContext)
129
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
130
        p.RuleIndex = JsonPathParserRULE_jsonpath
131
        return p
132
}
func NewEmptyIdentifierWithQualifierContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

568
func NewEmptyIdentifierWithQualifierContext() *IdentifierWithQualifierContext {
569
        var p = new(IdentifierWithQualifierContext)
570
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
571
        p.RuleIndex = JsonPathParserRULE_identifierWithQualifier
572
        return p
573
}
func DotnotationContext.Accept
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

330
func (s *DotnotationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
331
        switch t := visitor.(type) {
332
        case JsonPathVisitor:
333
                return t.VisitDotnotation(s)
334
335
        default:
336
                return t.VisitChildren(s)
337
        }
338
}
func Dotnotation_exprContext.Accept
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

494
func (s *Dotnotation_exprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
495
        switch t := visitor.(type) {
496
        case JsonPathVisitor:
497
                return t.VisitDotnotation_expr(s)
498
499
        default:
500
                return t.VisitChildren(s)
501
        }
502
}
func JsonpathContext.Accept
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

190
func (s *JsonpathContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
191
        switch t := visitor.(type) {
192
        case JsonPathVisitor:
193
                return t.VisitJsonpath(s)
194
195
        default:
196
                return t.VisitChildren(s)
197
        }
198
}
func IdentifierWithQualifierContext.Accept
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

619
func (s *IdentifierWithQualifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
620
        switch t := visitor.(type) {
621
        case JsonPathVisitor:
622
                return t.VisitIdentifierWithQualifier(s)
623
624
        default:
625
                return t.VisitChildren(s)
626
        }
627
}
func InitEmptyDotnotationContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

249
func InitEmptyDotnotationContext(p *DotnotationContext) {
250
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
251
        p.RuleIndex = JsonPathParserRULE_dotnotation
252
}
func DotnotationContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

318
func (s *DotnotationContext) EnterRule(listener antlr.ParseTreeListener) {
319
        if listenerT, ok := listener.(JsonPathListener); ok {
320
                listenerT.EnterDotnotation(s)
321
        }
322
}
func Dotnotation_exprContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

488
func (s *Dotnotation_exprContext) ExitRule(listener antlr.ParseTreeListener) {
489
        if listenerT, ok := listener.(JsonPathListener); ok {
490
                listenerT.ExitDotnotation_expr(s)
491
        }
492
}
func InitEmptyIdentifierWithQualifierContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

575
func InitEmptyIdentifierWithQualifierContext(p *IdentifierWithQualifierContext) {
576
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
577
        p.RuleIndex = JsonPathParserRULE_identifierWithQualifier
578
}
func JsonpathContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

178
func (s *JsonpathContext) EnterRule(listener antlr.ParseTreeListener) {
179
        if listenerT, ok := listener.(JsonPathListener); ok {
180
                listenerT.EnterJsonpath(s)
181
        }
182
}
func JsonpathContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

184
func (s *JsonpathContext) ExitRule(listener antlr.ParseTreeListener) {
185
        if listenerT, ok := listener.(JsonPathListener); ok {
186
                listenerT.ExitJsonpath(s)
187
        }
188
}
func IdentifierWithQualifierContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

613
func (s *IdentifierWithQualifierContext) ExitRule(listener antlr.ParseTreeListener) {
614
        if listenerT, ok := listener.(JsonPathListener); ok {
615
                listenerT.ExitIdentifierWithQualifier(s)
616
        }
617
}
func InitEmptyJsonpathContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

134
func InitEmptyJsonpathContext(p *JsonpathContext) {
135
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
136
        p.RuleIndex = JsonPathParserRULE_jsonpath
137
}
func Dotnotation_exprContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

482
func (s *Dotnotation_exprContext) EnterRule(listener antlr.ParseTreeListener) {
483
        if listenerT, ok := listener.(JsonPathListener); ok {
484
                listenerT.EnterDotnotation_expr(s)
485
        }
486
}
func IdentifierWithQualifierContext.EnterRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

607
func (s *IdentifierWithQualifierContext) EnterRule(listener antlr.ParseTreeListener) {
608
        if listenerT, ok := listener.(JsonPathListener); ok {
609
                listenerT.EnterIdentifierWithQualifier(s)
610
        }
611
}
func InitEmptyDotnotation_exprContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

434
func InitEmptyDotnotation_exprContext(p *Dotnotation_exprContext) {
435
        antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
436
        p.RuleIndex = JsonPathParserRULE_dotnotation_expr
437
}
func DotnotationContext.ExitRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

324
func (s *DotnotationContext) ExitRule(listener antlr.ParseTreeListener) {
325
        if listenerT, ok := listener.(JsonPathListener); ok {
326
                listenerT.ExitDotnotation(s)
327
        }
328
}
func BaseJsonPathVisitor.VisitIdentifierWithQualifier
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go:

22
func (v *BaseJsonPathVisitor) VisitIdentifierWithQualifier(ctx *IdentifierWithQualifierContext) interface{} {
23
        return v.VisitChildren(ctx)
24
}
func IdentifierWithQualifierContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

593
func (s *IdentifierWithQualifierContext) GetParser() antlr.Parser { return s.parser }
func BaseJsonPathVisitor.VisitJsonpath
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go:

10
func (v *BaseJsonPathVisitor) VisitJsonpath(ctx *JsonpathContext) interface{} {
11
        return v.VisitChildren(ctx)
12
}
func DotnotationContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

310
func (s *DotnotationContext) GetRuleContext() antlr.RuleContext {
311
        return s
312
}
func DotnotationContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

314
func (s *DotnotationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
315
        return antlr.TreesStringTree(s, ruleNames, recog)
316
}
func DotnotationContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

267
func (s *DotnotationContext) GetParser() antlr.Parser { return s.parser }
func BaseJsonPathVisitor.VisitDotnotation_expr
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go:

18
func (v *BaseJsonPathVisitor) VisitDotnotation_expr(ctx *Dotnotation_exprContext) interface{} {
19
        return v.VisitChildren(ctx)
20
}
func IdentifierWithQualifierContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

599
func (s *IdentifierWithQualifierContext) GetRuleContext() antlr.RuleContext {
600
        return s
601
}
func IdentifierWithQualifierContext.INDENTIFIER
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

595
func (s *IdentifierWithQualifierContext) INDENTIFIER() antlr.TerminalNode {
596
        return s.GetToken(JsonPathParserINDENTIFIER, 0)
597
}
func BaseJsonPathVisitor.VisitDotnotation
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_visitor.go:

14
func (v *BaseJsonPathVisitor) VisitDotnotation(ctx *DotnotationContext) interface{} {
15
        return v.VisitChildren(ctx)
16
}
func IdentifierWithQualifierContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

603
func (s *IdentifierWithQualifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
604
        return antlr.TreesStringTree(s, ruleNames, recog)
605
}
func JsonpathContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

152
func (s *JsonpathContext) GetParser() antlr.Parser { return s.parser }
func JsonpathContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

174
func (s *JsonpathContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
175
        return antlr.TreesStringTree(s, ruleNames, recog)
176
}
func Dotnotation_exprContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

452
func (s *Dotnotation_exprContext) GetParser() antlr.Parser { return s.parser }
func JsonpathContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

170
func (s *JsonpathContext) GetRuleContext() antlr.RuleContext {
171
        return s
172
}
func Dotnotation_exprContext.INDENTIFIER
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

470
func (s *Dotnotation_exprContext) INDENTIFIER() antlr.TerminalNode {
471
        return s.GetToken(JsonPathParserINDENTIFIER, 0)
472
}
func Dotnotation_exprContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

474
func (s *Dotnotation_exprContext) GetRuleContext() antlr.RuleContext {
475
        return s
476
}
func Dotnotation_exprContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

478
func (s *Dotnotation_exprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
479
        return antlr.TreesStringTree(s, ruleNames, recog)
480
}
func Dotnotation_exprContext.IsDotnotation_exprContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

439
func (*Dotnotation_exprContext) IsDotnotation_exprContext() {}
func BaseJsonPathListener.ExitDotnotation
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

33
func (s *BaseJsonPathListener) ExitDotnotation(ctx *DotnotationContext) {}
func BaseJsonPathListener.EnterDotnotation
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

30
func (s *BaseJsonPathListener) EnterDotnotation(ctx *DotnotationContext) {}
func BaseJsonPathListener.ExitJsonpath
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

27
func (s *BaseJsonPathListener) ExitJsonpath(ctx *JsonpathContext) {}
func BaseJsonPathListener.EnterJsonpath
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

24
func (s *BaseJsonPathListener) EnterJsonpath(ctx *JsonpathContext) {}
func BaseJsonPathListener.EnterDotnotation_expr
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

36
func (s *BaseJsonPathListener) EnterDotnotation_expr(ctx *Dotnotation_exprContext) {}
func IdentifierWithQualifierContext.IsIdentifierWithQualifierContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

580
func (*IdentifierWithQualifierContext) IsIdentifierWithQualifierContext() {}
func BaseJsonPathListener.ExitEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

21
func (s *BaseJsonPathListener) ExitEveryRule(ctx antlr.ParserRuleContext) {}
func BaseJsonPathListener.ExitDotnotation_expr
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

39
func (s *BaseJsonPathListener) ExitDotnotation_expr(ctx *Dotnotation_exprContext) {}
func BaseJsonPathListener.EnterIdentifierWithQualifier
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

42
func (s *BaseJsonPathListener) EnterIdentifierWithQualifier(ctx *IdentifierWithQualifierContext) {}
func BaseJsonPathListener.ExitIdentifierWithQualifier
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

45
func (s *BaseJsonPathListener) ExitIdentifierWithQualifier(ctx *IdentifierWithQualifierContext) {}
func DotnotationContext.IsDotnotationContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

254
func (*DotnotationContext) IsDotnotationContext() {}
func BaseJsonPathListener.VisitTerminal
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

12
func (s *BaseJsonPathListener) VisitTerminal(node antlr.TerminalNode) {}
func JsonpathContext.IsJsonpathContext
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_parser.go:

139
func (*JsonpathContext) IsJsonpathContext() {}
func BaseJsonPathListener.EnterEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

18
func (s *BaseJsonPathListener) EnterEveryRule(ctx antlr.ParserRuleContext) {}
func BaseJsonPathListener.VisitErrorNode
Back

In /Users/kun/gobatis/gobatis/parser/structpath/jsonpath_base_listener.go:

15
func (s *BaseJsonPathListener) VisitErrorNode(node antlr.ErrorNode) {}
Package Overview: github.com/gobatis/gobatis/parser/xml 37.5%

Please select a function to see what's left for testing.

NewXMLLexer(...) github.com/gobatis/gobatis/parser/xml/xml_lexer.go 100.0% 15/15
NewXMLParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 13/13
NewContentContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 5/5
NewElementContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 5/5
NewDocumentContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 5/5
NewReferenceContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 5/5
NewChardataContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 5/5
DocumentContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
ChardataContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
ReferenceContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
@936:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
ReferenceContext.EntityRef(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
ContentContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
@232:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
@565:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
@775:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
@1122:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
ElementContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
ElementContext.Name(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 1/1
XMLParser.Chardata(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 92.3% 12/13
XMLParser.Reference(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 92.3% 12/13
XMLParser.Content(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 78.6% 33/42
XMLParser.Document(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 63.6% 21/33
XMLParser.Element(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 58.8% 30/51
@779:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 16.7% 1/6
@569:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 16.7% 1/6
@940:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 16.7% 1/6
@1126:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 16.7% 1/6
@236:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 16.7% 1/6
XMLParser.Prolog(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/20
XMLParser.Misc(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/13
XMLParser.Attribute(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/12
DocumentContext.AllMisc(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
ElementContext.AllAttribute(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
ContentContext.AllElement(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
ContentContext.AllReference(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
@382:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
@1221:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
PrologContext.AllAttribute(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
@1034:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
ContentContext.AllChardata(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/6
NewAttributeContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/5
NewMiscContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/5
NewPrologContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/5
ContentContext.Chardata(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
PrologContext.Attribute(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyChardataContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyAttributeContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
DocumentContext.Element(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyElementContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyDocumentContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
DocumentContext.Prolog(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
ContentContext.Reference(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
DocumentContext.Misc(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
ContentContext.Element(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyReferenceContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyMiscContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyPrologContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
NewEmptyContentContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
ElementContext.Content(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
ElementContext.Attribute(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/4
ElementContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
AttributeContext.Name(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.SLASH_CLOSE(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.CLOSE(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
@378:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.AllCLOSE(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
PrologContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.AllName(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
@1217:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.OPEN(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ReferenceContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
DocumentContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ReferenceContext.CharRef(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.AllOPEN(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ReferenceContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
PrologContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
PrologContext.XMLDeclOpen(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.SLASH(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
PrologContext.SPECIAL_CLOSE(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
MiscContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
AttributeContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
MiscContext.COMMENT(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
AttributeContext.EQUALS(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
AttributeContext.STRING(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
AttributeContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
AttributeContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.COMMENT(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
@1030:8(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.AllCOMMENT(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.PI(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
MiscContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.AllPI(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ChardataContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ChardataContext.TEXT(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ChardataContext.SEA_WS(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
DocumentContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ChardataContext.ToStringTree(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
MiscContext.SEA_WS(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.CDATA(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.AllCDATA(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ContentContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
MiscContext.PI(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
PrologContext.GetRuleContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
MiscContext.GetParser(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 0.0% 0/1
ElementContext.IsElementContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
MiscContext.IsMiscContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
DocumentContext.IsDocumentContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
ChardataContext.IsChardataContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
AttributeContext.IsAttributeContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
ContentContext.IsContentContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
ReferenceContext.IsReferenceContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
PrologContext.IsPrologContext(...) github.com/gobatis/gobatis/parser/xml/xml_parser.go 100.0% 0/0
BaseXMLParserListener.VisitTerminal(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.VisitErrorNode(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterEveryRule(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitEveryRule(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterDocument(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitDocument(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterProlog(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitProlog(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterContent(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitContent(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterElement(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitElement(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterReference(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitReference(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterAttribute(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitAttribute(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterChardata(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitChardata(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.EnterMisc(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
BaseXMLParserListener.ExitMisc(...) github.com/gobatis/gobatis/parser/xml/xmlparser_base_listener.go 100.0% 0/0
func NewXMLLexer
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_lexer.go:

162
func NewXMLLexer(input antlr.CharStream) *XMLLexer {
163
        l := new(XMLLexer)
164
        lexerDeserializer := antlr.NewATNDeserializer(nil)
165
        lexerAtn := lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn)
166
        lexerDecisionToDFA := make([]*antlr.DFA, len(lexerAtn.DecisionToState))
167
        for index, ds := range lexerAtn.DecisionToState {
168
                lexerDecisionToDFA[index] = antlr.NewDFA(ds, index)
169
        }
170
        l.BaseLexer = antlr.NewBaseLexer(input)
171
        l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache())
172
173
        l.channelNames = lexerChannelNames
174
        l.modeNames = lexerModeNames
175
        l.RuleNames = lexerRuleNames
176
        l.LiteralNames = lexerLiteralNames
177
        l.SymbolicNames = lexerSymbolicNames
178
        l.GrammarFileName = "XMLLexer.g4"
179
        // TODO: l.EOF = antlr.TokenEOF
180
181
        return l
182
}
func NewXMLParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

84
func NewXMLParser(input antlr.TokenStream) *XMLParser {
85
        this := new(XMLParser)
86
        deserializer := antlr.NewATNDeserializer(nil)
87
        deserializedATN := deserializer.DeserializeFromUInt16(parserATN)
88
        decisionToDFA := make([]*antlr.DFA, len(deserializedATN.DecisionToState))
89
        for index, ds := range deserializedATN.DecisionToState {
90
                decisionToDFA[index] = antlr.NewDFA(ds, index)
91
        }
92
        this.BaseParser = antlr.NewBaseParser(input)
93
94
        this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache())
95
        this.RuleNames = ruleNames
96
        this.LiteralNames = literalNames
97
        this.SymbolicNames = symbolicNames
98
        this.GrammarFileName = "XMLParser.g4"
99
100
        return this
101
}
func NewContentContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

446
func NewContentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ContentContext {
447
        var p = new(ContentContext)
448
449
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
450
451
        p.parser = parser
452
        p.RuleIndex = XMLParserRULE_content
453
454
        return p
455
}
func NewElementContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

684
func NewElementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ElementContext {
685
        var p = new(ElementContext)
686
687
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
688
689
        p.parser = parser
690
        p.RuleIndex = XMLParserRULE_element
691
692
        return p
693
}
func NewDocumentContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

163
func NewDocumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DocumentContext {
164
        var p = new(DocumentContext)
165
166
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
167
168
        p.parser = parser
169
        p.RuleIndex = XMLParserRULE_document
170
171
        return p
172
}
func NewReferenceContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

902
func NewReferenceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ReferenceContext {
903
        var p = new(ReferenceContext)
904
905
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
906
907
        p.parser = parser
908
        p.RuleIndex = XMLParserRULE_reference
909
910
        return p
911
}
func NewChardataContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1088
func NewChardataContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ChardataContext {
1089
        var p = new(ChardataContext)
1090
1091
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
1092
1093
        p.parser = parser
1094
        p.RuleIndex = XMLParserRULE_chardata
1095
1096
        return p
1097
}
func DocumentContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

219
func (s *DocumentContext) GetRuleContext() antlr.RuleContext {
220
        return s
221
}
func ChardataContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1109
func (s *ChardataContext) GetRuleContext() antlr.RuleContext {
1110
        return s
1111
}
func ReferenceContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

923
func (s *ReferenceContext) GetRuleContext() antlr.RuleContext {
924
        return s
925
}
func @936:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

936
func() {
937
                p.ExitRule()
938
        }
func ReferenceContext.EntityRef
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

915
func (s *ReferenceContext) EntityRef() antlr.TerminalNode {
916
        return s.GetToken(XMLParserEntityRef, 0)
917
}
func ContentContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

552
func (s *ContentContext) GetRuleContext() antlr.RuleContext {
553
        return s
554
}
func @232:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

232
func() {
233
                p.ExitRule()
234
        }
func @565:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

565
func() {
566
                p.ExitRule()
567
        }
func @775:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

775
func() {
776
                p.ExitRule()
777
        }
func @1122:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1122
func() {
1123
                p.ExitRule()
1124
        }
func ElementContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

762
func (s *ElementContext) GetRuleContext() antlr.RuleContext {
763
        return s
764
}
func ElementContext.Name
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

709
func (s *ElementContext) Name(i int) antlr.TerminalNode {
710
        return s.GetToken(XMLParserName, i)
711
}
func XMLParser.Chardata
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1117
func (p *XMLParser) Chardata() (localctx IChardataContext) {
1118
        localctx = NewChardataContext(p, p.GetParserRuleContext(), p.GetState())
1119
        p.EnterRule(localctx, 12, XMLParserRULE_chardata)
1120
        var _la int
1121
1122
        defer func() {
1123
                p.ExitRule()
1124
        }()
1125
1126
        defer func() {
1127
                if err := recover(); err != nil {
1128
                        if v, ok := err.(antlr.RecognitionException); ok {
1129
                                localctx.SetException(v)
1130
                                p.GetErrorHandler().ReportError(p, v)
1131
                                p.GetErrorHandler().Recover(p, v)
1132
                        } else {
1133
                                panic(err)
1134
                        }
1135
                }
1136
        }()
1137
1138
        p.EnterOuterAlt(localctx, 1)
1139
        {
1140
                p.SetState(91)
1141
                _la = p.GetTokenStream().LA(1)
1142
1143
                if !(_la == XMLParserSEA_WS || _la == XMLParserTEXT) {
1144
                        p.GetErrorHandler().RecoverInline(p)
1145
                } else {
1146
                        p.GetErrorHandler().ReportMatch(p)
1147
                        p.Consume()
1148
                }
1149
        }
1150
1151
        return localctx
1152
}
func XMLParser.Reference
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

931
func (p *XMLParser) Reference() (localctx IReferenceContext) {
932
        localctx = NewReferenceContext(p, p.GetParserRuleContext(), p.GetState())
933
        p.EnterRule(localctx, 8, XMLParserRULE_reference)
934
        var _la int
935
936
        defer func() {
937
                p.ExitRule()
938
        }()
939
940
        defer func() {
941
                if err := recover(); err != nil {
942
                        if v, ok := err.(antlr.RecognitionException); ok {
943
                                localctx.SetException(v)
944
                                p.GetErrorHandler().ReportError(p, v)
945
                                p.GetErrorHandler().Recover(p, v)
946
                        } else {
947
                                panic(err)
948
                        }
949
                }
950
        }()
951
952
        p.EnterOuterAlt(localctx, 1)
953
        {
954
                p.SetState(85)
955
                _la = p.GetTokenStream().LA(1)
956
957
                if !(_la == XMLParserEntityRef || _la == XMLParserCharRef) {
958
                        p.GetErrorHandler().RecoverInline(p)
959
                } else {
960
                        p.GetErrorHandler().ReportMatch(p)
961
                        p.Consume()
962
                }
963
        }
964
965
        return localctx
966
}
func XMLParser.Content
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

560
func (p *XMLParser) Content() (localctx IContentContext) {
561
        localctx = NewContentContext(p, p.GetParserRuleContext(), p.GetState())
562
        p.EnterRule(localctx, 4, XMLParserRULE_content)
563
        var _la int
564
565
        defer func() {
566
                p.ExitRule()
567
        }()
568
569
        defer func() {
570
                if err := recover(); err != nil {
571
                        if v, ok := err.(antlr.RecognitionException); ok {
572
                                localctx.SetException(v)
573
                                p.GetErrorHandler().ReportError(p, v)
574
                                p.GetErrorHandler().Recover(p, v)
575
                        } else {
576
                                panic(err)
577
                        }
578
                }
579
        }()
580
581
        var _alt int
582
583
        p.EnterOuterAlt(localctx, 1)
584
        p.SetState(42)
585
        p.GetErrorHandler().Sync(p)
586
        _la = p.GetTokenStream().LA(1)
587
588
        if _la == XMLParserSEA_WS || _la == XMLParserTEXT {
589
                {
590
                        p.SetState(41)
591
                        p.Chardata()
592
                }
593
594
        }
595
        p.SetState(56)
596
        p.GetErrorHandler().Sync(p)
597
        _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 7, p.GetParserRuleContext())
598
599
        for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
600
                if _alt == 1 {
601
                        p.SetState(49)
602
                        p.GetErrorHandler().Sync(p)
603
604
                        switch p.GetTokenStream().LA(1) {
605
                        case XMLParserOPEN:
606
                                {
607
                                        p.SetState(44)
608
                                        p.Element()
609
                                }
610
611
                        case XMLParserEntityRef, XMLParserCharRef:
612
                                {
613
                                        p.SetState(45)
614
                                        p.Reference()
615
                                }
616
617
                        case XMLParserCDATA:
618
                                {
619
                                        p.SetState(46)
620
                                        p.Match(XMLParserCDATA)
621
                                }
622
623
                        case XMLParserPI:
624
                                {
625
                                        p.SetState(47)
626
                                        p.Match(XMLParserPI)
627
                                }
628
629
                        case XMLParserCOMMENT:
630
                                {
631
                                        p.SetState(48)
632
                                        p.Match(XMLParserCOMMENT)
633
                                }
634
635
                        default:
636
                                panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
637
                        }
638
                        p.SetState(52)
639
                        p.GetErrorHandler().Sync(p)
640
                        _la = p.GetTokenStream().LA(1)
641
642
                        if _la == XMLParserSEA_WS || _la == XMLParserTEXT {
643
                                {
644
                                        p.SetState(51)
645
                                        p.Chardata()
646
                                }
647
648
                        }
649
650
                }
651
                p.SetState(58)
652
                p.GetErrorHandler().Sync(p)
653
                _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 7, p.GetParserRuleContext())
654
        }
655
656
        return localctx
657
}
func XMLParser.Document
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

227
func (p *XMLParser) Document() (localctx IDocumentContext) {
228
        localctx = NewDocumentContext(p, p.GetParserRuleContext(), p.GetState())
229
        p.EnterRule(localctx, 0, XMLParserRULE_document)
230
        var _la int
231
232
        defer func() {
233
                p.ExitRule()
234
        }()
235
236
        defer func() {
237
                if err := recover(); err != nil {
238
                        if v, ok := err.(antlr.RecognitionException); ok {
239
                                localctx.SetException(v)
240
                                p.GetErrorHandler().ReportError(p, v)
241
                                p.GetErrorHandler().Recover(p, v)
242
                        } else {
243
                                panic(err)
244
                        }
245
                }
246
        }()
247
248
        p.EnterOuterAlt(localctx, 1)
249
        p.SetState(17)
250
        p.GetErrorHandler().Sync(p)
251
        _la = p.GetTokenStream().LA(1)
252
253
        if _la == XMLParserXMLDeclOpen {
254
                {
255
                        p.SetState(16)
256
                        p.Prolog()
257
                }
258
259
        }
260
        p.SetState(22)
261
        p.GetErrorHandler().Sync(p)
262
        _la = p.GetTokenStream().LA(1)
263
264
        for ((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<XMLParserCOMMENT)|(1<<XMLParserSEA_WS)|(1<<XMLParserPI))) != 0 {
265
                {
266
                        p.SetState(19)
267
                        p.Misc()
268
                }
269
270
                p.SetState(24)
271
                p.GetErrorHandler().Sync(p)
272
                _la = p.GetTokenStream().LA(1)
273
        }
274
        {
275
                p.SetState(25)
276
                p.Element()
277
        }
278
        p.SetState(29)
279
        p.GetErrorHandler().Sync(p)
280
        _la = p.GetTokenStream().LA(1)
281
282
        for ((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<XMLParserCOMMENT)|(1<<XMLParserSEA_WS)|(1<<XMLParserPI))) != 0 {
283
                {
284
                        p.SetState(26)
285
                        p.Misc()
286
                }
287
288
                p.SetState(31)
289
                p.GetErrorHandler().Sync(p)
290
                _la = p.GetTokenStream().LA(1)
291
        }
292
293
        return localctx
294
}
func XMLParser.Element
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

770
func (p *XMLParser) Element() (localctx IElementContext) {
771
        localctx = NewElementContext(p, p.GetParserRuleContext(), p.GetState())
772
        p.EnterRule(localctx, 6, XMLParserRULE_element)
773
        var _la int
774
775
        defer func() {
776
                p.ExitRule()
777
        }()
778
779
        defer func() {
780
                if err := recover(); err != nil {
781
                        if v, ok := err.(antlr.RecognitionException); ok {
782
                                localctx.SetException(v)
783
                                p.GetErrorHandler().ReportError(p, v)
784
                                p.GetErrorHandler().Recover(p, v)
785
                        } else {
786
                                panic(err)
787
                        }
788
                }
789
        }()
790
791
        p.SetState(83)
792
        p.GetErrorHandler().Sync(p)
793
        switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 10, p.GetParserRuleContext()) {
794
        case 1:
795
                p.EnterOuterAlt(localctx, 1)
796
                {
797
                        p.SetState(59)
798
                        p.Match(XMLParserOPEN)
799
                }
800
                {
801
                        p.SetState(60)
802
                        p.Match(XMLParserName)
803
                }
804
                p.SetState(64)
805
                p.GetErrorHandler().Sync(p)
806
                _la = p.GetTokenStream().LA(1)
807
808
                for _la == XMLParserName {
809
                        {
810
                                p.SetState(61)
811
                                p.Attribute()
812
                        }
813
814
                        p.SetState(66)
815
                        p.GetErrorHandler().Sync(p)
816
                        _la = p.GetTokenStream().LA(1)
817
                }
818
                {
819
                        p.SetState(67)
820
                        p.Match(XMLParserCLOSE)
821
                }
822
                {
823
                        p.SetState(68)
824
                        p.Content()
825
                }
826
                {
827
                        p.SetState(69)
828
                        p.Match(XMLParserOPEN)
829
                }
830
                {
831
                        p.SetState(70)
832
                        p.Match(XMLParserSLASH)
833
                }
834
                {
835
                        p.SetState(71)
836
                        p.Match(XMLParserName)
837
                }
838
                {
839
                        p.SetState(72)
840
                        p.Match(XMLParserCLOSE)
841
                }
842
843
        case 2:
844
                p.EnterOuterAlt(localctx, 2)
845
                {
846
                        p.SetState(74)
847
                        p.Match(XMLParserOPEN)
848
                }
849
                {
850
                        p.SetState(75)
851
                        p.Match(XMLParserName)
852
                }
853
                p.SetState(79)
854
                p.GetErrorHandler().Sync(p)
855
                _la = p.GetTokenStream().LA(1)
856
857
                for _la == XMLParserName {
858
                        {
859
                                p.SetState(76)
860
                                p.Attribute()
861
                        }
862
863
                        p.SetState(81)
864
                        p.GetErrorHandler().Sync(p)
865
                        _la = p.GetTokenStream().LA(1)
866
                }
867
                {
868
                        p.SetState(82)
869
                        p.Match(XMLParserSLASH_CLOSE)
870
                }
871
872
        }
873
874
        return localctx
875
}
func @779:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

779
func() {
780
                if err := recover(); err != nil {
781
                        if v, ok := err.(antlr.RecognitionException); ok {
782
                                localctx.SetException(v)
783
                                p.GetErrorHandler().ReportError(p, v)
784
                                p.GetErrorHandler().Recover(p, v)
785
                        } else {
786
                                panic(err)
787
                        }
788
                }
789
        }
func @569:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

569
func() {
570
                if err := recover(); err != nil {
571
                        if v, ok := err.(antlr.RecognitionException); ok {
572
                                localctx.SetException(v)
573
                                p.GetErrorHandler().ReportError(p, v)
574
                                p.GetErrorHandler().Recover(p, v)
575
                        } else {
576
                                panic(err)
577
                        }
578
                }
579
        }
func @940:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

940
func() {
941
                if err := recover(); err != nil {
942
                        if v, ok := err.(antlr.RecognitionException); ok {
943
                                localctx.SetException(v)
944
                                p.GetErrorHandler().ReportError(p, v)
945
                                p.GetErrorHandler().Recover(p, v)
946
                        } else {
947
                                panic(err)
948
                        }
949
                }
950
        }
func @1126:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1126
func() {
1127
                if err := recover(); err != nil {
1128
                        if v, ok := err.(antlr.RecognitionException); ok {
1129
                                localctx.SetException(v)
1130
                                p.GetErrorHandler().ReportError(p, v)
1131
                                p.GetErrorHandler().Recover(p, v)
1132
                        } else {
1133
                                panic(err)
1134
                        }
1135
                }
1136
        }
func @236:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

236
func() {
237
                if err := recover(); err != nil {
238
                        if v, ok := err.(antlr.RecognitionException); ok {
239
                                localctx.SetException(v)
240
                                p.GetErrorHandler().ReportError(p, v)
241
                                p.GetErrorHandler().Recover(p, v)
242
                        } else {
243
                                panic(err)
244
                        }
245
                }
246
        }
func XMLParser.Prolog
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

373
func (p *XMLParser) Prolog() (localctx IPrologContext) {
374
        localctx = NewPrologContext(p, p.GetParserRuleContext(), p.GetState())
375
        p.EnterRule(localctx, 2, XMLParserRULE_prolog)
376
        var _la int
377
378
        defer func() {
379
                p.ExitRule()
380
        }()
381
382
        defer func() {
383
                if err := recover(); err != nil {
384
                        if v, ok := err.(antlr.RecognitionException); ok {
385
                                localctx.SetException(v)
386
                                p.GetErrorHandler().ReportError(p, v)
387
                                p.GetErrorHandler().Recover(p, v)
388
                        } else {
389
                                panic(err)
390
                        }
391
                }
392
        }()
393
394
        p.EnterOuterAlt(localctx, 1)
395
        {
396
                p.SetState(32)
397
                p.Match(XMLParserXMLDeclOpen)
398
        }
399
        p.SetState(36)
400
        p.GetErrorHandler().Sync(p)
401
        _la = p.GetTokenStream().LA(1)
402
403
        for _la == XMLParserName {
404
                {
405
                        p.SetState(33)
406
                        p.Attribute()
407
                }
408
409
                p.SetState(38)
410
                p.GetErrorHandler().Sync(p)
411
                _la = p.GetTokenStream().LA(1)
412
        }
413
        {
414
                p.SetState(39)
415
                p.Match(XMLParserSPECIAL_CLOSE)
416
        }
417
418
        return localctx
419
}
func XMLParser.Misc
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1212
func (p *XMLParser) Misc() (localctx IMiscContext) {
1213
        localctx = NewMiscContext(p, p.GetParserRuleContext(), p.GetState())
1214
        p.EnterRule(localctx, 14, XMLParserRULE_misc)
1215
        var _la int
1216
1217
        defer func() {
1218
                p.ExitRule()
1219
        }()
1220
1221
        defer func() {
1222
                if err := recover(); err != nil {
1223
                        if v, ok := err.(antlr.RecognitionException); ok {
1224
                                localctx.SetException(v)
1225
                                p.GetErrorHandler().ReportError(p, v)
1226
                                p.GetErrorHandler().Recover(p, v)
1227
                        } else {
1228
                                panic(err)
1229
                        }
1230
                }
1231
        }()
1232
1233
        p.EnterOuterAlt(localctx, 1)
1234
        {
1235
                p.SetState(93)
1236
                _la = p.GetTokenStream().LA(1)
1237
1238
                if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<XMLParserCOMMENT)|(1<<XMLParserSEA_WS)|(1<<XMLParserPI))) != 0) {
1239
                        p.GetErrorHandler().RecoverInline(p)
1240
                } else {
1241
                        p.GetErrorHandler().ReportMatch(p)
1242
                        p.Consume()
1243
                }
1244
        }
1245
1246
        return localctx
1247
}
func XMLParser.Attribute
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1026
func (p *XMLParser) Attribute() (localctx IAttributeContext) {
1027
        localctx = NewAttributeContext(p, p.GetParserRuleContext(), p.GetState())
1028
        p.EnterRule(localctx, 10, XMLParserRULE_attribute)
1029
1030
        defer func() {
1031
                p.ExitRule()
1032
        }()
1033
1034
        defer func() {
1035
                if err := recover(); err != nil {
1036
                        if v, ok := err.(antlr.RecognitionException); ok {
1037
                                localctx.SetException(v)
1038
                                p.GetErrorHandler().ReportError(p, v)
1039
                                p.GetErrorHandler().Recover(p, v)
1040
                        } else {
1041
                                panic(err)
1042
                        }
1043
                }
1044
        }()
1045
1046
        p.EnterOuterAlt(localctx, 1)
1047
        {
1048
                p.SetState(87)
1049
                p.Match(XMLParserName)
1050
        }
1051
        {
1052
                p.SetState(88)
1053
                p.Match(XMLParserEQUALS)
1054
        }
1055
        {
1056
                p.SetState(89)
1057
                p.Match(XMLParserSTRING)
1058
        }
1059
1060
        return localctx
1061
}
func DocumentContext.AllMisc
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

196
func (s *DocumentContext) AllMisc() []IMiscContext {
197
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IMiscContext)(nil)).Elem())
198
        var tst = make([]IMiscContext, len(ts))
199
200
        for i, t := range ts {
201
                if t != nil {
202
                        tst[i] = t.(IMiscContext)
203
                }
204
        }
205
206
        return tst
207
}
func ElementContext.AllAttribute
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

735
func (s *ElementContext) AllAttribute() []IAttributeContext {
736
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IAttributeContext)(nil)).Elem())
737
        var tst = make([]IAttributeContext, len(ts))
738
739
        for i, t := range ts {
740
                if t != nil {
741
                        tst[i] = t.(IAttributeContext)
742
                }
743
        }
744
745
        return tst
746
}
func ContentContext.AllElement
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

482
func (s *ContentContext) AllElement() []IElementContext {
483
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IElementContext)(nil)).Elem())
484
        var tst = make([]IElementContext, len(ts))
485
486
        for i, t := range ts {
487
                if t != nil {
488
                        tst[i] = t.(IElementContext)
489
                }
490
        }
491
492
        return tst
493
}
func ContentContext.AllReference
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

505
func (s *ContentContext) AllReference() []IReferenceContext {
506
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IReferenceContext)(nil)).Elem())
507
        var tst = make([]IReferenceContext, len(ts))
508
509
        for i, t := range ts {
510
                if t != nil {
511
                        tst[i] = t.(IReferenceContext)
512
                }
513
        }
514
515
        return tst
516
}
func @382:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

382
func() {
383
                if err := recover(); err != nil {
384
                        if v, ok := err.(antlr.RecognitionException); ok {
385
                                localctx.SetException(v)
386
                                p.GetErrorHandler().ReportError(p, v)
387
                                p.GetErrorHandler().Recover(p, v)
388
                        } else {
389
                                panic(err)
390
                        }
391
                }
392
        }
func @1221:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1221
func() {
1222
                if err := recover(); err != nil {
1223
                        if v, ok := err.(antlr.RecognitionException); ok {
1224
                                localctx.SetException(v)
1225
                                p.GetErrorHandler().ReportError(p, v)
1226
                                p.GetErrorHandler().Recover(p, v)
1227
                        } else {
1228
                                panic(err)
1229
                        }
1230
                }
1231
        }
func PrologContext.AllAttribute
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

342
func (s *PrologContext) AllAttribute() []IAttributeContext {
343
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IAttributeContext)(nil)).Elem())
344
        var tst = make([]IAttributeContext, len(ts))
345
346
        for i, t := range ts {
347
                if t != nil {
348
                        tst[i] = t.(IAttributeContext)
349
                }
350
        }
351
352
        return tst
353
}
func @1034:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1034
func() {
1035
                if err := recover(); err != nil {
1036
                        if v, ok := err.(antlr.RecognitionException); ok {
1037
                                localctx.SetException(v)
1038
                                p.GetErrorHandler().ReportError(p, v)
1039
                                p.GetErrorHandler().Recover(p, v)
1040
                        } else {
1041
                                panic(err)
1042
                        }
1043
                }
1044
        }
func ContentContext.AllChardata
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

459
func (s *ContentContext) AllChardata() []IChardataContext {
460
        var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IChardataContext)(nil)).Elem())
461
        var tst = make([]IChardataContext, len(ts))
462
463
        for i, t := range ts {
464
                if t != nil {
465
                        tst[i] = t.(IChardataContext)
466
                }
467
        }
468
469
        return tst
470
}
func NewAttributeContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

993
func NewAttributeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AttributeContext {
994
        var p = new(AttributeContext)
995
996
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
997
998
        p.parser = parser
999
        p.RuleIndex = XMLParserRULE_attribute
1000
1001
        return p
1002
}
func NewMiscContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1179
func NewMiscContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MiscContext {
1180
        var p = new(MiscContext)
1181
1182
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
1183
1184
        p.parser = parser
1185
        p.RuleIndex = XMLParserRULE_misc
1186
1187
        return p
1188
}
func NewPrologContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

321
func NewPrologContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrologContext {
322
        var p = new(PrologContext)
323
324
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
325
326
        p.parser = parser
327
        p.RuleIndex = XMLParserRULE_prolog
328
329
        return p
330
}
func ContentContext.Chardata
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

472
func (s *ContentContext) Chardata(i int) IChardataContext {
473
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IChardataContext)(nil)).Elem(), i)
474
475
        if t == nil {
476
                return nil
477
        }
478
479
        return t.(IChardataContext)
480
}
func PrologContext.Attribute
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

355
func (s *PrologContext) Attribute(i int) IAttributeContext {
356
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IAttributeContext)(nil)).Elem(), i)
357
358
        if t == nil {
359
                return nil
360
        }
361
362
        return t.(IAttributeContext)
363
}
func NewEmptyChardataContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1079
func NewEmptyChardataContext() *ChardataContext {
1080
        var p = new(ChardataContext)
1081
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
1082
        p.RuleIndex = XMLParserRULE_chardata
1083
        return p
1084
}
func NewEmptyAttributeContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

984
func NewEmptyAttributeContext() *AttributeContext {
985
        var p = new(AttributeContext)
986
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
987
        p.RuleIndex = XMLParserRULE_attribute
988
        return p
989
}
func DocumentContext.Element
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

176
func (s *DocumentContext) Element() IElementContext {
177
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IElementContext)(nil)).Elem(), 0)
178
179
        if t == nil {
180
                return nil
181
        }
182
183
        return t.(IElementContext)
184
}
func NewEmptyElementContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

675
func NewEmptyElementContext() *ElementContext {
676
        var p = new(ElementContext)
677
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
678
        p.RuleIndex = XMLParserRULE_element
679
        return p
680
}
func NewEmptyDocumentContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

154
func NewEmptyDocumentContext() *DocumentContext {
155
        var p = new(DocumentContext)
156
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
157
        p.RuleIndex = XMLParserRULE_document
158
        return p
159
}
func DocumentContext.Prolog
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

186
func (s *DocumentContext) Prolog() IPrologContext {
187
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IPrologContext)(nil)).Elem(), 0)
188
189
        if t == nil {
190
                return nil
191
        }
192
193
        return t.(IPrologContext)
194
}
func ContentContext.Reference
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

518
func (s *ContentContext) Reference(i int) IReferenceContext {
519
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IReferenceContext)(nil)).Elem(), i)
520
521
        if t == nil {
522
                return nil
523
        }
524
525
        return t.(IReferenceContext)
526
}
func DocumentContext.Misc
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

209
func (s *DocumentContext) Misc(i int) IMiscContext {
210
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IMiscContext)(nil)).Elem(), i)
211
212
        if t == nil {
213
                return nil
214
        }
215
216
        return t.(IMiscContext)
217
}
func ContentContext.Element
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

495
func (s *ContentContext) Element(i int) IElementContext {
496
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IElementContext)(nil)).Elem(), i)
497
498
        if t == nil {
499
                return nil
500
        }
501
502
        return t.(IElementContext)
503
}
func NewEmptyReferenceContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

893
func NewEmptyReferenceContext() *ReferenceContext {
894
        var p = new(ReferenceContext)
895
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
896
        p.RuleIndex = XMLParserRULE_reference
897
        return p
898
}
func NewEmptyMiscContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1170
func NewEmptyMiscContext() *MiscContext {
1171
        var p = new(MiscContext)
1172
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
1173
        p.RuleIndex = XMLParserRULE_misc
1174
        return p
1175
}
func NewEmptyPrologContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

312
func NewEmptyPrologContext() *PrologContext {
313
        var p = new(PrologContext)
314
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
315
        p.RuleIndex = XMLParserRULE_prolog
316
        return p
317
}
func NewEmptyContentContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

437
func NewEmptyContentContext() *ContentContext {
438
        var p = new(ContentContext)
439
        p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
440
        p.RuleIndex = XMLParserRULE_content
441
        return p
442
}
func ElementContext.Content
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

721
func (s *ElementContext) Content() IContentContext {
722
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IContentContext)(nil)).Elem(), 0)
723
724
        if t == nil {
725
                return nil
726
        }
727
728
        return t.(IContentContext)
729
}
func ElementContext.Attribute
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

748
func (s *ElementContext) Attribute(i int) IAttributeContext {
749
        var t = s.GetTypedRuleContext(reflect.TypeOf((*IAttributeContext)(nil)).Elem(), i)
750
751
        if t == nil {
752
                return nil
753
        }
754
755
        return t.(IAttributeContext)
756
}
func ElementContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

695
func (s *ElementContext) GetParser() antlr.Parser { return s.parser }
func AttributeContext.Name
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1006
func (s *AttributeContext) Name() antlr.TerminalNode {
1007
        return s.GetToken(XMLParserName, 0)
1008
}
func ElementContext.SLASH_CLOSE
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

758
func (s *ElementContext) SLASH_CLOSE() antlr.TerminalNode {
759
        return s.GetToken(XMLParserSLASH_CLOSE, 0)
760
}
func ElementContext.CLOSE
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

717
func (s *ElementContext) CLOSE(i int) antlr.TerminalNode {
718
        return s.GetToken(XMLParserCLOSE, i)
719
}
func ElementContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

766
func (s *ElementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
767
        return antlr.TreesStringTree(s, ruleNames, recog)
768
}
func @378:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

378
func() {
379
                p.ExitRule()
380
        }
func ElementContext.AllCLOSE
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

713
func (s *ElementContext) AllCLOSE() []antlr.TerminalNode {
714
        return s.GetTokens(XMLParserCLOSE)
715
}
func PrologContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

332
func (s *PrologContext) GetParser() antlr.Parser { return s.parser }
func ElementContext.AllName
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

705
func (s *ElementContext) AllName() []antlr.TerminalNode {
706
        return s.GetTokens(XMLParserName)
707
}
func @1217:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1217
func() {
1218
                p.ExitRule()
1219
        }
func ElementContext.OPEN
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

701
func (s *ElementContext) OPEN(i int) antlr.TerminalNode {
702
        return s.GetToken(XMLParserOPEN, i)
703
}
func ReferenceContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

913
func (s *ReferenceContext) GetParser() antlr.Parser { return s.parser }
func DocumentContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

223
func (s *DocumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
224
        return antlr.TreesStringTree(s, ruleNames, recog)
225
}
func ReferenceContext.CharRef
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

919
func (s *ReferenceContext) CharRef() antlr.TerminalNode {
920
        return s.GetToken(XMLParserCharRef, 0)
921
}
func ElementContext.AllOPEN
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

697
func (s *ElementContext) AllOPEN() []antlr.TerminalNode {
698
        return s.GetTokens(XMLParserOPEN)
699
}
func ReferenceContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

927
func (s *ReferenceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
928
        return antlr.TreesStringTree(s, ruleNames, recog)
929
}
func PrologContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

369
func (s *PrologContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
370
        return antlr.TreesStringTree(s, ruleNames, recog)
371
}
func PrologContext.XMLDeclOpen
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

334
func (s *PrologContext) XMLDeclOpen() antlr.TerminalNode {
335
        return s.GetToken(XMLParserXMLDeclOpen, 0)
336
}
func ElementContext.SLASH
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

731
func (s *ElementContext) SLASH() antlr.TerminalNode {
732
        return s.GetToken(XMLParserSLASH, 0)
733
}
func PrologContext.SPECIAL_CLOSE
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

338
func (s *PrologContext) SPECIAL_CLOSE() antlr.TerminalNode {
339
        return s.GetToken(XMLParserSPECIAL_CLOSE, 0)
340
}
func MiscContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1208
func (s *MiscContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1209
        return antlr.TreesStringTree(s, ruleNames, recog)
1210
}
func ContentContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

556
func (s *ContentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
557
        return antlr.TreesStringTree(s, ruleNames, recog)
558
}
func AttributeContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1004
func (s *AttributeContext) GetParser() antlr.Parser { return s.parser }
func MiscContext.COMMENT
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1192
func (s *MiscContext) COMMENT() antlr.TerminalNode {
1193
        return s.GetToken(XMLParserCOMMENT, 0)
1194
}
func AttributeContext.EQUALS
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1010
func (s *AttributeContext) EQUALS() antlr.TerminalNode {
1011
        return s.GetToken(XMLParserEQUALS, 0)
1012
}
func AttributeContext.STRING
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1014
func (s *AttributeContext) STRING() antlr.TerminalNode {
1015
        return s.GetToken(XMLParserSTRING, 0)
1016
}
func AttributeContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1018
func (s *AttributeContext) GetRuleContext() antlr.RuleContext {
1019
        return s
1020
}
func AttributeContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1022
func (s *AttributeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1023
        return antlr.TreesStringTree(s, ruleNames, recog)
1024
}
func ContentContext.COMMENT
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

548
func (s *ContentContext) COMMENT(i int) antlr.TerminalNode {
549
        return s.GetToken(XMLParserCOMMENT, i)
550
}
func @1030:8
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1030
func() {
1031
                p.ExitRule()
1032
        }
func ContentContext.AllCOMMENT
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

544
func (s *ContentContext) AllCOMMENT() []antlr.TerminalNode {
545
        return s.GetTokens(XMLParserCOMMENT)
546
}
func ContentContext.PI
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

540
func (s *ContentContext) PI(i int) antlr.TerminalNode {
541
        return s.GetToken(XMLParserPI, i)
542
}
func MiscContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1204
func (s *MiscContext) GetRuleContext() antlr.RuleContext {
1205
        return s
1206
}
func ContentContext.AllPI
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

536
func (s *ContentContext) AllPI() []antlr.TerminalNode {
537
        return s.GetTokens(XMLParserPI)
538
}
func ChardataContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1099
func (s *ChardataContext) GetParser() antlr.Parser { return s.parser }
func ChardataContext.TEXT
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1101
func (s *ChardataContext) TEXT() antlr.TerminalNode {
1102
        return s.GetToken(XMLParserTEXT, 0)
1103
}
func ChardataContext.SEA_WS
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1105
func (s *ChardataContext) SEA_WS() antlr.TerminalNode {
1106
        return s.GetToken(XMLParserSEA_WS, 0)
1107
}
func DocumentContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

174
func (s *DocumentContext) GetParser() antlr.Parser { return s.parser }
func ChardataContext.ToStringTree
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1113
func (s *ChardataContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
1114
        return antlr.TreesStringTree(s, ruleNames, recog)
1115
}
func MiscContext.SEA_WS
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1200
func (s *MiscContext) SEA_WS() antlr.TerminalNode {
1201
        return s.GetToken(XMLParserSEA_WS, 0)
1202
}
func ContentContext.CDATA
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

532
func (s *ContentContext) CDATA(i int) antlr.TerminalNode {
533
        return s.GetToken(XMLParserCDATA, i)
534
}
func ContentContext.AllCDATA
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

528
func (s *ContentContext) AllCDATA() []antlr.TerminalNode {
529
        return s.GetTokens(XMLParserCDATA)
530
}
func ContentContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

457
func (s *ContentContext) GetParser() antlr.Parser { return s.parser }
func MiscContext.PI
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1196
func (s *MiscContext) PI() antlr.TerminalNode {
1197
        return s.GetToken(XMLParserPI, 0)
1198
}
func PrologContext.GetRuleContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

365
func (s *PrologContext) GetRuleContext() antlr.RuleContext {
366
        return s
367
}
func MiscContext.GetParser
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1190
func (s *MiscContext) GetParser() antlr.Parser { return s.parser }
func ElementContext.IsElementContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

682
func (*ElementContext) IsElementContext() {}
func MiscContext.IsMiscContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1177
func (*MiscContext) IsMiscContext() {}
func DocumentContext.IsDocumentContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

161
func (*DocumentContext) IsDocumentContext() {}
func ChardataContext.IsChardataContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

1086
func (*ChardataContext) IsChardataContext() {}
func AttributeContext.IsAttributeContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

991
func (*AttributeContext) IsAttributeContext() {}
func ContentContext.IsContentContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

444
func (*ContentContext) IsContentContext() {}
func ReferenceContext.IsReferenceContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

900
func (*ReferenceContext) IsReferenceContext() {}
func PrologContext.IsPrologContext
Back

In /Users/kun/gobatis/gobatis/parser/xml/xml_parser.go:

319
func (*PrologContext) IsPrologContext() {}
func BaseXMLParserListener.VisitTerminal
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

12
func (s *BaseXMLParserListener) VisitTerminal(node antlr.TerminalNode) {}
func BaseXMLParserListener.VisitErrorNode
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

15
func (s *BaseXMLParserListener) VisitErrorNode(node antlr.ErrorNode) {}
func BaseXMLParserListener.EnterEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

18
func (s *BaseXMLParserListener) EnterEveryRule(ctx antlr.ParserRuleContext) {}
func BaseXMLParserListener.ExitEveryRule
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

21
func (s *BaseXMLParserListener) ExitEveryRule(ctx antlr.ParserRuleContext) {}
func BaseXMLParserListener.EnterDocument
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

24
func (s *BaseXMLParserListener) EnterDocument(ctx *DocumentContext) {}
func BaseXMLParserListener.ExitDocument
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

27
func (s *BaseXMLParserListener) ExitDocument(ctx *DocumentContext) {}
func BaseXMLParserListener.EnterProlog
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

30
func (s *BaseXMLParserListener) EnterProlog(ctx *PrologContext) {}
func BaseXMLParserListener.ExitProlog
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

33
func (s *BaseXMLParserListener) ExitProlog(ctx *PrologContext) {}
func BaseXMLParserListener.EnterContent
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

36
func (s *BaseXMLParserListener) EnterContent(ctx *ContentContext) {}
func BaseXMLParserListener.ExitContent
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

39
func (s *BaseXMLParserListener) ExitContent(ctx *ContentContext) {}
func BaseXMLParserListener.EnterElement
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

42
func (s *BaseXMLParserListener) EnterElement(ctx *ElementContext) {}
func BaseXMLParserListener.ExitElement
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

45
func (s *BaseXMLParserListener) ExitElement(ctx *ElementContext) {}
func BaseXMLParserListener.EnterReference
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

48
func (s *BaseXMLParserListener) EnterReference(ctx *ReferenceContext) {}
func BaseXMLParserListener.ExitReference
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

51
func (s *BaseXMLParserListener) ExitReference(ctx *ReferenceContext) {}
func BaseXMLParserListener.EnterAttribute
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

54
func (s *BaseXMLParserListener) EnterAttribute(ctx *AttributeContext) {}
func BaseXMLParserListener.ExitAttribute
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

57
func (s *BaseXMLParserListener) ExitAttribute(ctx *AttributeContext) {}
func BaseXMLParserListener.EnterChardata
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

60
func (s *BaseXMLParserListener) EnterChardata(ctx *ChardataContext) {}
func BaseXMLParserListener.ExitChardata
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

63
func (s *BaseXMLParserListener) ExitChardata(ctx *ChardataContext) {}
func BaseXMLParserListener.EnterMisc
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

66
func (s *BaseXMLParserListener) EnterMisc(ctx *MiscContext) {}
func BaseXMLParserListener.ExitMisc
Back

In /Users/kun/gobatis/gobatis/parser/xml/xmlparser_base_listener.go:

69
func (s *BaseXMLParserListener) ExitMisc(ctx *MiscContext) {}
Report Total
45.8%