Skip to content

Commit 1f14f48

Browse files
committed
Cleanup comments and println
1 parent 6eee4fc commit 1f14f48

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/getter.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -527,21 +527,9 @@ impl Getter for JavaCode {
527527

528528
fn get_op_type(node: &Node) -> HalsteadType {
529529
use Java::*;
530-
530+
// Some guides that informed grammar choice for Halstead
531531
// keywords, operators, literals: https://docs.oracle.com/javase/specs/jls/se18/html/jls-3.html#jls-3.12
532532
// https://www.geeksforgeeks.org/software-engineering-halsteads-software-metrics/?msclkid=5e181114abef11ecbb03527e95a34828
533-
//
534-
// comments not considered
535-
// Operator: function calls?
536-
// Operator: control flow
537-
// Operator: keywords
538-
// Operator: brackets and comma and terminators
539-
// Operator: operators
540-
// Operator: InstanceOf
541-
// Operator: .
542-
// Operand: struct name
543-
// Operand: vars and const
544-
545533
let typ = node.object().kind_id();
546534

547535
match typ.into() {
@@ -561,17 +549,13 @@ impl Getter for JavaCode {
561549
// type identifier
562550
| TypeIdentifier | IntegralType | FloatingPointType | BooleanType
563551
=> {
564-
println!("operator: {}", node.object().kind());
565552
HalsteadType::Operator
566553
},
567-
568554
// Operands: variables, constants, literals
569555
Identifier | NullLiteral | ClassLiteral | StringLiteral | CharacterLiteral | HexIntegerLiteral | OctalIntegerLiteral | BinaryIntegerLiteral | DecimalIntegerLiteral | HexFloatingPointLiteral | DecimalFloatingPointLiteral => {
570-
println!("operand: {} ", node.object().kind());
571556
HalsteadType::Operand
572557
},
573558
_ => {
574-
println!("unknown: {} ", node.object().kind());
575559
HalsteadType::Unknown
576560
},
577561
}

0 commit comments

Comments
 (0)