Home | History | Annotate | Download | only in util

Lines Matching refs:lines

79 func extractComment(lines []string, lineNo int) (comment []string, rest []string, restLineNo int, err error) {
80 if len(lines) == 0 {
81 return nil, lines, lineNo, nil
85 rest = lines
117 /* Identing the lines of a paragraph marks them as
141 func extractDecl(lines []string, lineNo int) (decl string, rest []string, restLineNo int, err error) {
142 if len(lines) == 0 {
143 return "", lines, lineNo, nil
146 rest = lines
256 var lines, oldLines []string
258 lines = append(lines, scanner.Text())
266 for i, line := range lines {
269 lines = lines[i+1:]
280 if len(lines) == 0 || lines[0] != "extern \"C\" {" {
284 lines = lines[2:]
291 for i, line := range lines {
294 lines = lines[i:]
299 oldLines = lines
300 if len(lines) > 0 && strings.HasPrefix(lines[0], commentStart) {
301 comment, rest, restLineNo, err := extractComment(lines, lineNo)
308 return nil, errors.New("preamble comment should be followed by two blank lines")
312 lines = rest[2:]
314 lines = oldLines
322 if len(lines) == 0 {
325 line := lines[0]
337 comment, rest, restLineNo, err := extractComment(lines, lineNo)
353 lines = rest[1:]
358 for len(lines) > 0 {
359 line := lines[0]
361 lines = lines[1:]
372 comment, lines, lineNo, err = extractComment(lines, lineNo)
377 if len(lines) == 0 {
380 decl, lines, lineNo, err = extractDecl(lines, lineNo)
420 if len(lines) > 0 && len(lines[0]) == 0 {
421 lines = lines[1:]