Skip to content

Commit

Permalink
go generate ./...
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Feb 16, 2024
1 parent 2f101e2 commit a5c8352
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 108 deletions.
25 changes: 12 additions & 13 deletions hclsyntax/scan_string_lit.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//line scan_string_lit.rl:1
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

//line scan_string_lit.rl:1

package hclsyntax

// This file is generated from scan_string_lit.rl. DO NOT EDIT.

//line scan_string_lit.go:9
//line scan_string_lit.go:11
var _hclstrtok_actions []byte = []byte{
0, 1, 0, 1, 1, 2, 1, 0,
}
Expand Down Expand Up @@ -117,12 +116,12 @@ const hclstrtok_error int = 0
const hclstrtok_en_quoted int = 10
const hclstrtok_en_unquoted int = 4

//line scan_string_lit.rl:10
//line scan_string_lit.rl:12

func scanStringLit(data []byte, quoted bool) [][]byte {
var ret [][]byte

//line scan_string_lit.rl:61
//line scan_string_lit.rl:63

// Ragel state
p := 0 // "Pointer" into data
Expand All @@ -147,11 +146,11 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
ret = append(ret, data[ts:te])
}*/

//line scan_string_lit.go:154
//line scan_string_lit.go:156
{
}

//line scan_string_lit.go:158
//line scan_string_lit.go:160
{
var _klen int
var _trans int
Expand Down Expand Up @@ -232,7 +231,7 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
_acts++
switch _hclstrtok_actions[_acts-1] {
case 0:
//line scan_string_lit.rl:40
//line scan_string_lit.rl:42

// If te is behind p then we've skipped over some literal
// characters which we must now return.
Expand All @@ -242,12 +241,12 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
ts = p

case 1:
//line scan_string_lit.rl:48
//line scan_string_lit.rl:50

te = p
ret = append(ret, data[ts:te])

//line scan_string_lit.go:253
//line scan_string_lit.go:255
}
}

Expand All @@ -270,12 +269,12 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
__acts++
switch _hclstrtok_actions[__acts-1] {
case 1:
//line scan_string_lit.rl:48
//line scan_string_lit.rl:50

te = p
ret = append(ret, data[ts:te])

//line scan_string_lit.go:278
//line scan_string_lit.go:280
}
}
}
Expand All @@ -285,7 +284,7 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
}
}

//line scan_string_lit.rl:89
//line scan_string_lit.rl:91

if te < p {
// Collect any leftover literal characters at the end of the input
Expand Down

0 comments on commit a5c8352

Please sign in to comment.