Last change
on this file since 67 was 67, checked in by Izuru Yakumo, 23 months ago |
Use vendored modules
Signed-off-by: Izuru Yakumo <yakumo.izuru@…>
|
File size:
294 bytes
|
Line | |
---|
1 | // +build gofuzz
|
---|
2 |
|
---|
3 | package syntax
|
---|
4 |
|
---|
5 | // Fuzz is the input point for go-fuzz
|
---|
6 | func Fuzz(data []byte) int {
|
---|
7 | sdata := string(data)
|
---|
8 | tree, err := Parse(sdata, RegexOptions(0))
|
---|
9 | if err != nil {
|
---|
10 | return 0
|
---|
11 | }
|
---|
12 |
|
---|
13 | // translate it to code
|
---|
14 | _, err = Write(tree)
|
---|
15 | if err != nil {
|
---|
16 | panic(err)
|
---|
17 | }
|
---|
18 |
|
---|
19 | return 1
|
---|
20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.