terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

What means token in results? #179

Closed AdamZikmund closed 7 years ago

AdamZikmund commented 7 years ago

I am using Swift. I want to ask what means tokens in results ? public func getResults() -> Any? { return results } This method generate 6 tokens private func passDictionary(dictionary: [String : String]) { var mutable = dictionary let string = UUID().uuidString mutable[string] = string results = dictionary } And this 43

terryyin commented 7 years ago

Hi Adam,

Tokens here mean the words, operators or constants. The result doesn’t count the method declaration though, so the first one got 6 (“any, ?, {, return, results, }”).

Terry

On 21 Mar 2017, at 3:45 AM, Adam Zikmund notifications@github.com wrote:

I am using Swift. I want to ask what means tokens in results ? public func getResults() -> Any? { return results } This method generate 6 tokens private func passDictionary(dictionary: [String : String]) { var mutable = dictionary let string = UUID().uuidString mutable[string] = string results = dictionary } And this 43

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/179, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYrL6vJK6kfKPAvKWkkwKTwAtxWk1ks5rntc_gaJpZM4Mi7Bb.

AdamZikmund commented 7 years ago

Thank you, very much :)