Lines Matching refs:line

94     for line in lines:
96 if designated_re.match(line):
97 line = eval(repr(line).replace(f'\\"', ''))
98 return designated_re.match(line).group(1)
100 is_package = package.match(line) is not None
148 self.line = '' # original rustc command line parameters
149 self.line_num = 1 # runner told input source line number
150 # Parameters collected from rustc command line.
177 # convenient way to output one line at a time with EOL.
180 def parse_rustc(self, line_num: int, line: str):
183 self.line = line
184 args = line.split() # Loop through every argument of rustc.
581 self.write('\n// Line ' + str(self.line_num) + ' ' + self.line)
909 for line in infile:
912 if cargo_test_list_start_re.match(line):
913 current_test_name = cargo_test_list_start_re.match(line).group(1)
914 elif current_test_name and cargo_test_list_end_re.match(line):
915 match = cargo_test_list_end_re.match(line)
920 if compiling_pat.match(line):
921 self.add_deps_libname_map(compiling_pat.match(line).group(1))
931 def add_deps_libname_map(self, line: str):
932 line_list = line.split()
940 # Assume that the first line will contain some CARGO_* env definition.
946 previous_warning = False # true if the previous line was warning
947 rustc_line = '' # previous line matching rustc_vv_re
949 for line in infile:
951 if line.startswith('warning: '):
956 if rustc_re.match(line):
957 args_line = rustc_re.match(line).group(1)
960 elif rustc_line or rustc_vv_re.match(line):
962 line_num, rustc_line, line, outfile_name)
963 elif previous_warning and warning_output_file_re.match(line):
964 file_path = warning_output_file_re.match(line).group(1)
968 elif line.startswith('error: ') or line.startswith('error[E'):
970 self.add_error_infos(in_tests, line)
971 elif cargo_to_gn_running_re.match(line):
972 in_tests = "cargo test" in line and "--list" in line
976 def assert_empty_rustc_line(self, line: str):
977 # report error if line is not empty
978 if line:
979 self.append_to_gn('ERROR -vv line: ' + line)
982 def append_to_gn(self, line: str):
985 outfile.write(line)
986 print(line)
1000 def add_error_infos(self, in_tests: str, line: str):
1002 self.test_error_infos += '// '.join(line)
1004 self.error_infos += line
1006 def deal_rustc_command(self, line_num: str, rustc_line: str, line: str, outfile_name: str):
1007 """Process a rustc command line from cargo -vv output."""
1010 new_rustc_line = (rustc_line.strip() + line) if rustc_line else line
1011 # The combined -vv output rustc command line pattern.
1013 if not line.endswith('`\n') or (new_rustc_line.count('`') % 2) != 0:
1062 help=('Load command-line options from the given config file. ' +
1063 'Options in this file will override those passed on the command line.'))
1100 """Parses command-line options."""