MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / try_print_until

Function try_print_until

utils/dasFormatter/formatter.cpp:16–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14 static State state;
15
16 optional<Pos> try_print_until(Pos info) {
17 if (!state.enabled) {
18 return nullopt;
19 }
20 if (info.line < state.last.line) {
21 return state.last;
22 }
23 get_writer() << get_substring(state.last, info);
24 state.last = info;
25 return nullopt;
26 }
27
28
29 void init(TextWriter *ss, string content, FormatOptions options, ProgramPtr program) {

Callers 2

destroyFunction · 0.85
prepare_ruleFunction · 0.85

Calls 1

get_substringFunction · 0.85

Tested by

no test coverage detected