Lines Matching refs:lines
79 func extractComment(lines []string, lineNo int) (comment []string, rest []string, restLineNo int, e…
80 if len(lines) == 0 {
81 return nil, lines, lineNo, nil
85 rest = lines
141 func extractDecl(lines []string, lineNo int) (decl string, rest []string, restLineNo int, err error…
142 if len(lines) == 0 || len(lines[0]) == 0 {
143 return "", lines, lineNo, nil
146 rest = lines
269 var lines, oldLines []string
271 lines = append(lines, scanner.Text())
279 for i, line := range lines {
281 lines = lines[i+1:]
292 if len(lines) == 0 || lines[0] != "extern \"C\" {" {
296 lines = lines[2:]
303 for i, line := range lines {
305 lines = lines[i:]
311 oldLines = lines
312 if len(lines) > 0 && strings.HasPrefix(lines[0], commentStart) {
313 comment, rest, restLineNo, err := extractComment(lines, lineNo)
324 lines = rest[2:]
326 lines = oldLines
334 if len(lines) == 0 {
337 line := lines[0]
349 comment, rest, restLineNo, err := extractComment(lines, lineNo)
365 lines = rest[1:]
370 for len(lines) > 0 {
371 line := lines[0]
373 lines = lines[1:]
384 comment, lines, lineNo, err = extractComment(lines, lineNo)
389 if len(lines) == 0 {
393 decl, lines, lineNo, err = extractDecl(lines, lineNo)
435 if len(lines) > 0 && len(lines[0]) == 0 {
436 lines = lines[1:]