14.3. Lint fix helpers
The lint_fixups module holds the helpers the lint passes build their
--fix edits from: the source text of a node or a range, the checks
a rewrite must pass, and the shared LintFix constructors.
All functions and symbols are in “lint_fixups” module, use require to get access to it.
require daslib/lint_fixups
14.3.1. Fixes
lint_call_fix (e: Expression?; name: string; args: array<string>) : LintFix
lint_fix_site_ok (e: Expression?; fn: Function?; generic_safe: bool) : bool
lint_function_names (var fn: Function?) : table<string, void>
lint_merge_fixes (at: LineInfo; edits: array<LintFix>) : LintFix
lint_replace_fix (e: Expression?; replacement: string) : LintFix
lint_token_fix (at: LineInfo; ln: int; col: int; token: string; replacement: string) : LintFix
- lint_call_fix(e: Expression?; name: string; args: array<string> ): LintFix
def lint_call_fix (e: Expression?; name: string; args: array<string>) : LintFix
- Arguments:
e : Expression?
name : string
args : array<string>
- lint_expr_text(e: Expression? ): string
def lint_expr_text (e: Expression?) : string
- Arguments:
e : Expression?
- lint_fills_lines(e: Expression?; one_line: bool ): bool
def lint_fills_lines (e: Expression?; one_line: bool) : bool
- Arguments:
e : Expression?
one_line : bool
- lint_fix(at: LineInfo; replacement: string ): LintFix
def lint_fix (at: LineInfo; replacement: string) : LintFix
- Arguments:
at : LineInfo
replacement : string
- lint_fix_message(text: string; fix: LintFix ): string
def lint_fix_message (text: string; fix: LintFix) : string
- Arguments:
text : string
fix : LintFix
- lint_fix_site_ok(e: Expression?; fn: Function?; generic_safe: bool ): bool
def lint_fix_site_ok (e: Expression?; fn: Function?; generic_safe: bool) : bool
- Arguments:
e : Expression?
fn : Function?
generic_safe : bool
- lint_function_names(fn: Function? ): table<string, void>
def lint_function_names (var fn: Function?) : table<string, void>
- Arguments:
fn : Function?
- lint_has_comment(text: string ): bool
def lint_has_comment (text: string) : bool
- Arguments:
text : string
- lint_indent_of(line: string ): int
def lint_indent_of (line: string) : int
- Arguments:
line : string
- lint_is_operand(e: Expression? ): bool
def lint_is_operand (e: Expression?) : bool
- Arguments:
e : Expression?
- lint_merge_fixes(at: LineInfo; edits: array<LintFix> ): LintFix
def lint_merge_fixes (at: LineInfo; edits: array<LintFix>) : LintFix
- lint_module_visible(fn: Function?; name: string ): bool
def lint_module_visible (fn: Function?; name: string) : bool
- Arguments:
fn : Function?
name : string
- lint_name_counts(e: Expression? ): table<string, int>
def lint_name_counts (var e: Expression?) : table<string, int>
- Arguments:
e : Expression?
- lint_operand_text(e: Expression? ): string
def lint_operand_text (e: Expression?) : string
- Arguments:
e : Expression?
- lint_range(first: LineInfo; last: LineInfo ): LineInfo
def lint_range (first: LineInfo; last: LineInfo) : LineInfo
- lint_replace_fix(e: Expression?; replacement: string ): LintFix
def lint_replace_fix (e: Expression?; replacement: string) : LintFix
- Arguments:
e : Expression?
replacement : string
- lint_span_fix(at: LineInfo; replacement: string ): LintFix
def lint_span_fix (at: LineInfo; replacement: string) : LintFix
- Arguments:
at : LineInfo
replacement : string
- lint_span_text(at: LineInfo ): string
def lint_span_text (at: LineInfo) : string
- Arguments:
at : LineInfo
- lint_token_fix(at: LineInfo; ln: int; col: int; token: string; replacement: string ): LintFix
def lint_token_fix (at: LineInfo; ln: int; col: int; token: string; replacement: string) : LintFix
- Arguments:
at : LineInfo
ln : int
col : int
token : string
replacement : string
- lint_unwritten_arg(call: ExprCall?; k: int ): bool
def lint_unwritten_arg (call: ExprCall?; k: int) : bool
- Arguments:
call : ExprCall?
k : int