mirror of
https://github.com/atom/atom.git
synced 2026-01-27 07:47:58 -05:00
Use guard clauses, instead of crappy ANDs
This commit is contained in:
@@ -125,10 +125,14 @@ class TokenizedLine
|
||||
@lineEnding is null
|
||||
|
||||
isOutsidePhantomToken: (column) ->
|
||||
!@tokens[0].isPhantom || column > @tokens[0].screenDelta
|
||||
return true unless @tokens[0].isPhantom
|
||||
|
||||
column > @tokens[0].screenDelta
|
||||
|
||||
isInsidePhantomToken: (column) ->
|
||||
@tokens[0].isPhantom && column < @tokens[0].screenDelta
|
||||
return false unless @tokens[0].isPhantom
|
||||
|
||||
column < @tokens[0].screenDelta
|
||||
|
||||
hasOnlyPhantomTokens: ->
|
||||
@tokens.length == 1 && @tokens[0].isPhantom
|
||||
|
||||
Reference in New Issue
Block a user