Paste: scan and scan-hooks

Author: dharmatech
Mode: factor
Date: Mon, 24 Nov 2008 13:05:18
Plain Text |
: scan-hooks ( -- table ) H{ } ;

: scan ( -- str/f )

  lexer get parse-token
  dup scan-hooks at
    [ nip call ]
    [ ]
  if* ;

! Do this to add support for comments to scan for example:
!
! [ lexer get next-line scan* ] "!" scan-hooks set-at

New Annotation

Summary:
Author:
Mode:
Body: