Skip to content

Commit

Permalink
remove remaining todo flags
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo committed Mar 24, 2021
1 parent 33f05ac commit ddaffee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ class ParserATNSimulator extends ATNSimulator {
}

void predicateDFAState(DFAState dfaState, DecisionState? decisionState) {
// Todo: this if was added due to a possuble null pointer error
// Todo: this if was added due to a possible null pointer error
if (decisionState == null) return;

// We need to test all predicates, even in DFA states that
Expand Down
4 changes: 2 additions & 2 deletions runtime/Dart/lib/src/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract class Parser extends Recognizer<ParserATNSimulator> {
/// later call to {@link #setTrace}{@code (false)}. The listener itself is
/// implemented as a parser listener so this field is not directly used by
/// other parser methods.
TraceListener? _tracer; // Todo: this is nullable and nothing can change this
TraceListener? _tracer;

/// The list of [ParseTreeListener] listeners registered to receive
/// events during the parse.
Expand Down Expand Up @@ -236,7 +236,7 @@ abstract class Parser extends Recognizer<ParserATNSimulator> {
///
/// @throws NullPointerException if {@code} listener is null
void addParseListener(
ParseTreeListener listener, //Todo: never make it null
ParseTreeListener listener,
) {
_parseListeners ??= [];

Expand Down
2 changes: 1 addition & 1 deletion runtime/Dart/lib/src/parser_rule_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ParserRuleContext extends RuleContext {
/// Get the initial/final token in this context.
/// Note that the range from start to stop is inclusive, so for rules that do not consume anything
/// (for example, zero length or error productions) this token may exceed stop.
Token? start, stop; // Todo: keep an eye on this late
Token? start, stop;

/// The exception that forced this rule to return. If the rule successfully
/// completed, this is null.
Expand Down
3 changes: 1 addition & 2 deletions runtime/Dart/lib/src/prediction_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,7 @@ class ArrayPredictionContext extends PredictionContext {
/// Parent can be null only if full ctx mode and we make an array
/// from {@link #EMPTY} and non-empty. We merge {@link #EMPTY} by using null parent and
/// returnState == {@link #EMPTY_RETURN_STATE}.
List<PredictionContext?>
parents; // Todo: this generic should be null this wont change
List<PredictionContext?> parents;

/// Sorted for merge, no duplicates; if present,
/// {@link #EMPTY_RETURN_STATE} is always last.
Expand Down

0 comments on commit ddaffee

Please sign in to comment.