compareTo

open operator override fun compareTo(other: AstNode): Int

Sorts by start position, then by length, then arbitrarily by hash code. Lets Comment and error nodes be mixed into a sorted collection of other AST nodes.