Skip to content

Commit e63c07d

Browse files
committed
Merge branch 'master' of https://github.com/mes258/textToCode
2 parents b8a66f0 + 5d280ee commit e63c07d

4 files changed

Lines changed: 2 additions & 14 deletions

File tree

textToCode/textToCode/JavaClass.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ class JavaClass{
3535
classVariables.append(JavaVariable.init(name: varName, vis: vis, type: type));
3636
}
3737

38-
// func addMethodVar(method: Int, varName: String, vis: String, type: String){
39-
// methods[method].addVar(varName: varName, vis: vis, type: type);
40-
// }
41-
4238
func findMethod(_ methodName: String) -> JavaMethod?{
4339
return methods.first(where: { (m:JavaMethod) -> Bool in
4440
return m.getName() == methodName
@@ -83,8 +79,6 @@ class JavaClass{
8379
output.append(formattedVar)
8480
}
8581
for xmethod in methods{
86-
// var tab = NSMutableAttributedString(string: "\t");
87-
// output.append(tab);
8882
output.append(xmethod.toFormattedString())
8983
}
9084

@@ -94,7 +88,6 @@ class JavaClass{
9488
if let xclass = SpeechProcessor.state.currentClass{
9589
if xclass.name == self.name && SpeechProcessor.state.currentMethod == nil{
9690
output = NSMutableAttributedString(string: self.toString());
97-
9891
output.addAttributes([NSAttributedString.Key.foregroundColor: UIColor.init(red: 0.7, green: 0.0, blue: 1.0, alpha: 1.0)] as [NSAttributedString.Key: Any], range: NSRange(location: 0, length: self.toString().count));
9992
}
10093
}

textToCode/textToCode/JavaExpression.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
// Created by Michael Smith on 4/26/19.
66
// Copyright © 2019 Michael Smith. All rights reserved.
77
//
8+
// Abstract parent class for control flow, variables, loops, everything else really
9+
//
810

911
import Foundation
1012

1113
class JavaExpression{
12-
//Control flow, variables, loops, everything else really
13-
//use a set to keep track of key words (declared names in scope)
14-
1514

1615
init() {
1716

textToCode/textToCode/JavaMethod.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class JavaMethod{
1717
var expressions: [JavaExpression] = [];
1818
private var inStructure = false;
1919

20-
//Need to account for parameters
2120
init(name: String, vis: String, returnType: String) {
2221
self.name = name;
2322
self.visability = ItemVisability(rawValue: vis) ?? ItemVisability.defaultItem;

textToCode/textToCode/JavaState.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
import Foundation
1010

1111
class JavaState{
12-
//We should make this a singleton or cache it
1312
var classes: [JavaClass] = [];
1413
var currentClass: JavaClass? = nil;
1514
var currentMethod: JavaMethod? = nil;
16-
var atline: Int = 0;
1715
var previousState: JavaState? = nil;
1816
init() {
1917

@@ -110,7 +108,6 @@ class JavaState{
110108
}
111109
copy.currentClass = currentClass
112110
copy.currentMethod = currentMethod
113-
copy.atline = atline
114111
copy.previousState = previousState
115112

116113
return copy

0 commit comments

Comments
 (0)