Debian Codegraph @

internal/ast/lexcharlit.go

raw symbols SCIP
1 //Copyright 2013 Vastech SA (PTY) LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package astscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/
16
17 import (
18 "github.com/goccmack/gocc/internal/frontend/tokenscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/frontend/token`/"
19 "github.com/goccmack/gocc/internal/utilscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/util`/"
20 )
21
22 type LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit# struct {
23 Valscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#Val. rune
24 Litscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#Lit. []byte
25 sscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#s. string
26 }
27
28 func NewLexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/NewLexCharLit().(tok interface{}) (*LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#, error) {
29 return newLexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/newLexCharLit().(tok), nil
30 }
31
32 func newLexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/newLexCharLit().(tok interface{}) *LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit# {
33 c := new(LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#)
34 t := tok.(*tokenscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/frontend/token`/.Tokenscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/frontend/token`/Token#)
35
36 c.Valscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#Val. = utilscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/util`/.LitToRunescip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/util`/LitToRune().(t.Litscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/frontend/token`/Token#Lit.)
37 c.Litscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#Lit. = t.Litscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/frontend/token`/Token#Lit.
38 c.sscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#s. = utilscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/util`/.RuneToStringscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/util`/RuneToString().(c.Valscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#Val.)
39
40 return c
41 }
42
43 func newLexCharLitFromRunescip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/newLexCharLitFromRune().(c rune) *LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit# {
44 cl := &LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#{
45 Valscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#Val.: c,
46 sscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#s.: utilscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/util`/.RuneToStringscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/util`/RuneToString().(c),
47 }
48 cl.Litscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#Lit. = []byte(cl.sscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#s.)
49 return cl
50 }
51
52 func (this *LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#) IsTerminalscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#IsTerminal().() bool {
53 return true
54 }
55 func (this *LexCharLitscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#) Stringscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#String().() string {
56 return this.sscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/internal/ast`/LexCharLit#s.
57 }