Skip to content

Commit

Permalink
Add option opt for force optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ChAoSUnItY committed Feb 6, 2023
1 parent d386e8f commit e3e6703
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/org/yakou/lang/api/AbstractPreference.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ abstract class AbstractPreference {
var outputStream = System.out
var enableColor = false
var useAscii = false
var noOpt = true
var enableTiming = false
abstract fun reportBuilder(currentFile: File): FileReportBuilder?
}
7 changes: 7 additions & 0 deletions src/main/kotlin/org/yakou/lang/cli/ArgumentProcessor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ class ArgumentProcessor {

preference.enableColor = true
markedFlags["color"] = flagSpan
} else if (flag == "-opt") {
if (checkReassignment("opt", flag, flagSpan)) {
continue
}

preference.noOpt = true
markedFlags["opt"] = flagSpan
} else if (preference.sourceFile == null) {
val sourceFile = File(flag)

Expand Down

0 comments on commit e3e6703

Please sign in to comment.