Debian Codegraph @

example/errormsg/util/rune.go

raw symbols SCIP
1 // Code generated by gocc; DO NOT EDIT.
2
3 package utilscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/example/errormsg/util`/
4
5 import (
6 "fmtscip-go gomod github.com/golang/go/src go1.24 fmt/"
7 )
8
9 func RuneToStringscip-go gomod github.com/goccmack/gocc . `github.com/goccmack/gocc/example/errormsg/util`/RuneToString().(r rune) string {
10 if r >= 0x20 && r < 0x7f {
11 return fmtscip-go gomod github.com/golang/go/src go1.24 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24 fmt/Sprintf().("'%c'", r)
12 }
13 switch r {
14 case 0x07:
15 return "'\\a'"
16 case 0x08:
17 return "'\\b'"
18 case 0x0C:
19 return "'\\f'"
20 case 0x0A:
21 return "'\\n'"
22 case 0x0D:
23 return "'\\r'"
24 case 0x09:
25 return "'\\t'"
26 case 0x0b:
27 return "'\\v'"
28 case 0x5c:
29 return "'\\\\\\'"
30 case 0x27:
31 return "'\\''"
32 case 0x22:
33 return "'\\\"'"
34 }
35 if r < 0x10000 {
36 return fmtscip-go gomod github.com/golang/go/src go1.24 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24 fmt/Sprintf().("\\u%04x", r)
37 }
38 return fmtscip-go gomod github.com/golang/go/src go1.24 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24 fmt/Sprintf().("\\U%08x", r)
39 }