diff options
Diffstat (limited to 'ADSBStats/main.swift')
| -rw-r--r-- | ADSBStats/main.swift | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ADSBStats/main.swift b/ADSBStats/main.swift index d431e1f..d340e16 100644 --- a/ADSBStats/main.swift +++ b/ADSBStats/main.swift @@ -11,7 +11,7 @@ import RegexBuilder import SQLite3 import SwiftData -decoder_debug_mode = false +//decoder_debug_mode = false struct CommandLineArgs: ParsableCommand { @Option(name: .shortAndLong) var inputfile: String @@ -56,7 +56,8 @@ var count_messages=0 for line in adsb_source.components(separatedBy: .newlines) { var found=false count_messages += 1 - if let tokenMatch = try matchADSBLong.prefixMatch(in: line) { + let matchADSBLong = MatchADSBLong() + if let tokenMatch = matchADSBLong.prefixMatch(line) { found = true let str = String(tokenMatch.output) let startIndex = str.index(str.startIndex, offsetBy: 1) @@ -92,7 +93,8 @@ for line in adsb_source.components(separatedBy: .newlines) { q_df.addDF(decoder.DataFormat) }; - if let tokenMatch = try matchADSBShort.prefixMatch(in: line) { + let matchADSBShort = MatchADSBShort() + if let tokenMatch = matchADSBShort.prefixMatch(line) { //print("\(tokenMatch.output)") found = true |
