コード例 #1
0
            public override void EnterEndOfLine([NotNull] VBAParser.EndOfLineContext context)
            {
                int followingIndentationLevel = 0;

                // we have a proper newline
                if (context.NEWLINE() != null)
                {
                    // the last whitespace, which is the one in front of the next line's contents
                    var followingWhitespace = context.whiteSpace().LastOrDefault();
                    followingIndentationLevel = IndentationLevelFromWhitespace(followingWhitespace);
                }
                (_currentMember == null ? _moduleResults : _results).Add(new CodeMetricsResult(1, 0, followingIndentationLevel));
            }
コード例 #2
0
 public override void EnterEndOfLine([NotNull]  VBAParser.EndOfLineContext _) => workingValue++;
コード例 #3
0
 public override void ExitEndOfLine([NotNull] VBAParser.EndOfLineContext context)
 {
     _contexts.Add(context);
 }
コード例 #4
0
 public override void EnterEndOfLine([NotNull] VBAParser.EndOfLineContext context)
 {
     (_currentMember == null ? _moduleResults : _results).Add(new CodeMetricsResult(1, 0, 0));
 }