5 isComplete: -> @complete
7 isRecordable: -> @composedObject.isRecordable()
9 # Public: Marks this as complete upon receiving an object to compose with.
11 # composedObject - The next motion or operator.
14 compose: (@composedObject) ->
17 # Public: Executes the composed operator or motion.
21 @composedObject.execute?(@count)
23 # Public: Selects using the composed motion.
25 # Returns an array of booleans representing whether each selections' success.
27 @composedObject.select?(@count)
30 @composedObject.isLinewise()
33 # Used to track the number of times either a motion or operator should
36 class Repeat extends Prefix
39 # count - The initial digit of the repeat sequence.
40 constructor: (@count) -> @complete = false
42 # Public: Adds an additional digit to this repeat sequence.
44 # digit - A single digit, 0-9.
48 @count = @count * 10 + digit
51 # Used to track which register the following operator should operate on.
53 class Register extends Prefix
56 # name - The single character name of the desired register
57 constructor: (@name) -> @complete = false
59 # Public: Marks as complete and sets the operator's register if it accepts it.
61 # composedOperator - The operator this register pertains to.
64 compose: (composedObject) ->
66 composedObject.register = @name if composedObject.register?
68 module.exports = {Repeat, Register}