Changeset 37878 in project


Ignore:
Timestamp:
09/07/19 03:43:57 (2 weeks ago)
Author:
Kon Lovett
Message:

global symbol breaks from the right, not indempotent, reflow

Location:
release/5/apropos/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • release/5/apropos/trunk/apropos-api.scm

    r37675 r37878  
    170170(define (check-split-component loc obj #!optional (var 'split))
    171171  (case obj
    172     ((#f)
    173       obj )
    174     ((#:module #:name)
    175       obj )
     172    ((#f)               obj )
     173    ((#:module #:name)  obj )
    176174    (else
    177175      (error-argument-type loc obj *number-base-error-message* var)) ) )
     
    274272  ;
    275273  (cond
     274    ;
    276275    ((symbol? patt)
    277276      (make-apropos-matcher loc
    278277        (symbol->string patt)
    279278        case-insensitive? split force-regexp? internal?) )
     279    ;
    280280    ((string? patt)
    281281      (if force-regexp?
    282282        (gen-irregex-matcher (gen-irregex patt))
    283283        (gen-string-matcher patt)) )
     284    ;
    284285    ((irregex? patt)
    285286      (gen-irregex-matcher patt) )
     287    ;
    286288    ((pair? patt)
    287289      (if (not (eq? 'quote (car patt)))
     
    324326              quoted
    325327              case-insensitive? split #t internal?) ) ) ) )
     328    ;
    326329    (else
    327330      (error loc "invalid apropos pattern form" patt) ) ) )
  • release/5/apropos/trunk/apropos-csi.scm

    r37126 r37878  
    2626  apropos-api)
    2727
     28;;; Bug Support
     29
    2830(define-syntax apropos-toplevel-command
    2931  (syntax-rules ()
    30     ((_ arg0 ...)
     32    ((apropos-toplevel-command arg0 ...)
    3133      (chicken.csi#toplevel-command arg0 ...) ) ) )
    3234
  • release/5/apropos/trunk/apropos.egg

    r37675 r37878  
    55
    66((synopsis "CHICKEN apropos")
    7  (version "3.3.3")
     7 (version "3.3.4")
    88 (category misc)
    99 (author "[[kon lovett]]")
     
    1313  (srfi-13 "0.1")
    1414        (check-errors "3.1.0")
    15         (string-utils "2.1.0")
     15        (string-utils "2.1.1")
    1616        (symbol-utils "2.0.2"))
    1717 (test-dependencies test)
  • release/5/apropos/trunk/symbol-access.scm

    r37126 r37878  
    2424  (chicken fixnum)
    2525  (chicken type)
    26   (only (srfi 13) string-skip string-drop string-take string-index))
     26  (only (srfi 13) string-skip string-drop string-take string-index-right))
    2727
    2828;;;
     
    3030;;
    3131
    32 (define (internal-marker-prefix-length str)
     32(define-inline (namespace-tag-length str)
    3333  (cond
    3434    ((string-skip str #\#) => identity)
    35     (else                             0)) )
     35    (else                     0)) )
    3636
    37 (define (global-symbol-name-offset str)
    38   (string-index str #\# (internal-marker-prefix-length str)) )
     37(define (global-symbol-name-start str)
     38  (string-index-right str #\# (namespace-tag-length str)) )
    3939
    4040;;;
     
    6565;
    6666(define (internal-module-name? str)
    67   (not (zero? (internal-marker-prefix-length str))) )
     67  (not (zero? (namespace-tag-length str))) )
    6868
    6969(: split-prefixed-symbol (symbol --> string string))
     
    7575    (str (symbol->string sym))
    7676    ;module break char index
    77     (idx (global-symbol-name-offset str)) )
     77    (idx (global-symbol-name-start str)) )
    7878    ;module?
    7979    (if idx
  • release/5/apropos/trunk/symbol-table-access.scm

    r36254 r37878  
    5050;; Symbol Table
    5151
    52 (: root-symbol-table-size (--> fixnum))
     52(: root-symbol-table-size (-> fixnum))
    5353;
    5454(define root-symbol-table-size
     
    5656    "C_return( raw_symbol_table_size( use_root_symbol_table() ) );") )
    5757
    58 (: root-symbol-table-element (fixnum --> pair))
     58(: root-symbol-table-element (fixnum -> pair))
    5959;
    6060(define root-symbol-table-element
     
    6262    "C_return( raw_symbol_table_chain( use_root_symbol_table(), i ) );") )
    6363
    64 (: bucket-symbol (pair --> symbol))
     64(: bucket-symbol (pair -> symbol))
    6565;
    6666(define bucket-symbol
     
    6868    "C_return( raw_bucket_symbol( bucket ) );"))
    6969
    70 (: bucket-link (pair --> list))
     70(: bucket-link (pair -> list))
    7171;
    7272(define bucket-link
     
    7878(define bucket-last? null?)
    7979
    80 (: bucket-symbol-ref (list --> (or boolean symbol)))
     80(: bucket-symbol-ref (list -> (or boolean symbol)))
    8181;
    8282(define (bucket-symbol-ref bkt)
     
    8585    (bucket-symbol bkt) ) )
    8686
    87 (: bucket-link-ref (list --> (or boolean list)))
     87(: bucket-link-ref (list -> (or boolean list)))
    8888;
    8989(define (bucket-link-ref bkt)
     
    9696(define-type symbol-table-cursor pair)
    9797
    98 (: make-symbol-table-cursor (* * --> symbol-table-cursor))
     98(: make-symbol-table-cursor (* * -> symbol-table-cursor))
    9999;
    100100(define make-symbol-table-cursor cons)
     
    111111    (cursor-active? obj)) )
    112112
    113 (: cursor-index (symbol-table-cursor --> *))
     113(: cursor-index (symbol-table-cursor -> *))
    114114;
    115115(define cursor-index car)
     
    119119(define set-cursor-index! set-car!)
    120120
    121 (: cursor-bucket (symbol-table-cursor --> *))
     121(: cursor-bucket (symbol-table-cursor -> *))
    122122;
    123123(define cursor-bucket cdr)
     
    127127(define set-cursor-bucket! set-cdr!)
    128128
    129 (: symbol-table-cursor (--> symbol-table-cursor))
     129(: symbol-table-cursor (-> symbol-table-cursor))
    130130;
    131 (define (symbol-table-cursor)
    132   (make-symbol-table-cursor -1 '()) )
     131(define (symbol-table-cursor) (make-symbol-table-cursor -1 '()))
    133132
    134133;;;
Note: See TracChangeset for help on using the changeset viewer.