(n *ast.Node, ignoreActualIndentationRange *core.TextRange, sourceFile *ast.SourceFile, options lsutil.FormatCodeSettings)
| 15 | ) |
| 16 | |
| 17 | func GetIndentationForNode(n *ast.Node, ignoreActualIndentationRange *core.TextRange, sourceFile *ast.SourceFile, options lsutil.FormatCodeSettings) int { |
| 18 | startline, startpos := scanner.GetECMALineAndByteOffsetOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false)) |
| 19 | return getIndentationForNodeWorker(n, startline, startpos, ignoreActualIndentationRange /*indentationDelta*/, 0, sourceFile /*isNextChild*/, false, options) |
| 20 | } |
| 21 | |
| 22 | // GetIndentation computes the expected indentation for a position in a source file. |
| 23 | // This is the Go port of SmartIndenter.getIndentation from TypeScript. |
no test coverage detected