factor/basis/xmode/marker/context/context.factor

20 lines
398 B
Factor
Raw Normal View History

USING: accessors kernel ;
IN: xmode.marker.context
! Based on org.gjt.sp.jedit.syntax.TokenMarker.LineContext
TUPLE: line-context
parent
in-rule
in-rule-set
end
;
: <line-context> ( ruleset parent -- line-context )
2008-01-18 02:39:09 -05:00
over [ "no context" throw ] unless
line-context new
swap >>parent
swap >>in-rule-set ;
M: line-context clone
call-next-method [ clone ] change-parent ;