Home
last modified time | relevance | path

Searched +refs:syntax +refs:source +refs:module (Results 1 – 25 of 26127) sorted by relevance

12345678910>>...1046

/dports/lang/racket/racket-8.3/collects/syntax/
H A Dlocation.rkt32 #,(identifier-prune-to-source-module
74 (source-transformer syntax-quote-source))
94 (define (variable-reference->module-source/submod vr)
95 (define src (variable-reference->module-source vr))
102 (define-syntax-rule (module-source)
103 (variable-reference->module-source/submod
106 (define-for-syntax (do-quote-module stx fixup)
115 #'(fixup (module-source) (list 'path ...)))]))
117 (define-syntax (quote-module-name stx)
123 (define-syntax (quote-module-path stx)
[all …]
H A Dcontract.rkt12 #:positive (or/c syntax? string? module-path-index?
14 #:negative (or/c syntax? string? module-path-index?
22 (module runtime racket/base
135 (get-source-expr pos-source
138 (get-source-expr neg-source
173 (introduce (datum->syntax #'here `(for-meta ,phase-shift ,(quote-module-path runtime)))))
177 (define (get-source-expr source ctx)
185 [(syntax? source) #`(quote #,(source-location->string source))]
186 [(module-path-index? source)
190 (define collapsed (collapse-module-path-index source))
[all …]
H A Dpath-spec.rkt1 (module path-spec racket/base
12 (unless (module-path? s)
22 (unless (module-path? l)
31 (unless (module-path? l)
37 (let ([s (resolved-module-path-name
38 (module-path-index-resolve
39 (module-path-index-join l #f)))])
59 [(and (path? (syntax-source loc))
60 (complete-path? (syntax-source loc)))
62 (split-path (syntax-source loc))])
[all …]
/dports/lang/racket-minimal/racket-8.3/collects/syntax/
H A Dlocation.rkt32 #,(identifier-prune-to-source-module
74 (source-transformer syntax-quote-source))
94 (define (variable-reference->module-source/submod vr)
95 (define src (variable-reference->module-source vr))
102 (define-syntax-rule (module-source)
103 (variable-reference->module-source/submod
106 (define-for-syntax (do-quote-module stx fixup)
115 #'(fixup (module-source) (list 'path ...)))]))
117 (define-syntax (quote-module-name stx)
123 (define-syntax (quote-module-path stx)
[all …]
H A Dcontract.rkt12 #:positive (or/c syntax? string? module-path-index?
14 #:negative (or/c syntax? string? module-path-index?
22 (module runtime racket/base
135 (get-source-expr pos-source
138 (get-source-expr neg-source
173 (introduce (datum->syntax #'here `(for-meta ,phase-shift ,(quote-module-path runtime)))))
177 (define (get-source-expr source ctx)
185 [(syntax? source) #`(quote #,(source-location->string source))]
186 [(module-path-index? source)
190 (define collapsed (collapse-module-path-index source))
[all …]
H A Dpath-spec.rkt1 (module path-spec racket/base
12 (unless (module-path? s)
22 (unless (module-path? l)
31 (unless (module-path? l)
37 (let ([s (resolved-module-path-name
38 (module-path-index-resolve
39 (module-path-index-join l #f)))])
59 [(and (path? (syntax-source loc))
60 (complete-path? (syntax-source loc)))
62 (split-path (syntax-source loc))])
[all …]
/dports/lang/racket/racket-8.3/collects/racket/private/
H A Dthis-expression-source-directory.rkt11 (define-for-syntax (this-expression-source stx dir?)
16 (let* ([source (syntax-source stx)]
46 (let ([mpi (syntax-source-module stx)])
58 (define-syntax (this-expression-source-directory stx)
61 (define-syntax (this-expression-source-file stx)
64 (define (extract-module stx dir?)
65 (let ([srcmod (let ([mpi (syntax-source-module stx)])
78 (define (extract-module-directory stx)
79 (extract-module stx #t))
80 (define (extract-module-file stx)
[all …]
/dports/lang/racket-minimal/racket-8.3/collects/racket/private/
H A Dthis-expression-source-directory.rkt11 (define-for-syntax (this-expression-source stx dir?)
16 (let* ([source (syntax-source stx)]
46 (let ([mpi (syntax-source-module stx)])
58 (define-syntax (this-expression-source-directory stx)
61 (define-syntax (this-expression-source-file stx)
64 (define (extract-module stx dir?)
65 (let ([srcmod (let ([mpi (syntax-source-module stx)])
78 (define (extract-module-directory stx)
79 (extract-module stx #t))
80 (define (extract-module-file stx)
[all …]
/dports/lang/racket/racket-8.3/src/expander/syntax/
H A Dbinding.rkt43 syntax-source-module
44 identifier-prune-to-source-module)
139 ;; in the sense of `syntax-source-module`:
302 (define (syntax-transfer-shifts to-s from-s [inspector #f] #:non-source? [non-source? #f])
303 (syntax-add-shifts to-s (syntax-mpi-shifts from-s) inspector #:non-source? non-source?))
305 (define (syntax-add-shifts to-s shifts [inspector #f] #:non-source? [non-source? #f])
338 ;; We can imagine that a syntax object's source module is determined
342 ;; infer a source module from the module-path-index shifts that are
347 ;; toward a module source, so those are added as `non-source-shift`
349 (define (syntax-source-module s [source? #f])
[all …]
/dports/lang/racket-minimal/racket-8.3/src/expander/syntax/
H A Dbinding.rkt43 syntax-source-module
44 identifier-prune-to-source-module)
139 ;; in the sense of `syntax-source-module`:
302 (define (syntax-transfer-shifts to-s from-s [inspector #f] #:non-source? [non-source? #f])
303 (syntax-add-shifts to-s (syntax-mpi-shifts from-s) inspector #:non-source? non-source?))
305 (define (syntax-add-shifts to-s shifts [inspector #f] #:non-source? [non-source? #f])
338 ;; We can imagine that a syntax object's source module is determined
342 ;; infer a source module from the module-path-index shifts that are
347 ;; toward a module source, so those are added as `non-source-shift`
349 (define (syntax-source-module s [source? #f])
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/racket-doc/syntax/scribblings/
H A Dsrcloc.scrbl89 @defproc[(build-source-location-syntax [loc source-location?] ...) syntax?]{}
101 (build-source-location-syntax)
105 (build-source-location-syntax #f)
229 @defproc[(syntax-source-directory [stx syntax?]) (or/c path? #f)]
230 @defproc[(syntax-source-file-name [stx syntax?]) (or/c path? #f)]
243 (syntax-source-directory stx1)
244 (syntax-source-file-name stx1)
246 (syntax-source-directory stx2)
247 (syntax-source-directory stx2)
380 (define-syntax-rule (name) (quote-module-name))
[all …]
H A Dmodread.scrbl2 @(require "common.rkt" (for-label syntax/moddep))
6 @defmodule[syntax/modread]
13 @defproc[(check-module-form [stx (or/c syntax? eof-object?)]
15 [source-v (or/c string? false/c)])
16 (or/c syntax? false/c)]{
20 Racket's @racket[module]. The syntax object @racket[stx] can contain a
22 grounds that @racket[read-syntax] can produce an end-of-file.
29 the @racket[check-module-form] procedure returns a syntax object that
32 @racket[source-v] is not @racket[#f], a suitable exception is raised
33 using the @racket[write] form of the source in the message; if
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/drracket-tool-lib/drracket/private/syncheck/
H A Dtraversals.rkt51 (let ([is-module? (syntax-case sexp (module)
557 (syntax-source stx-obj)))
565 (list (syntax-source stx)
824 (unless (hash-ref module-lang-requires (list (syntax-source stx)
916 (connect-syntaxes (if (syntax-source raw-module-path)
931 (syntax-source match/prefix)
1209 (define req-source (find-source-editor raw-module-path))
1322 (syntax module-name)]
1371 (define source (syntax-source id))
1498 (vector (syntax-source shifted-id)
[all …]
/dports/lang/racket-minimal/racket-8.3/src/expander/boot/
H A Dcore-primitive.rkt74 syntax-source-module
75 identifier-prune-to-source-module
78 syntax-source
125 exn:fail:syntax:missing-module
126 make-exn:fail:syntax:missing-module
127 exn:fail:syntax:missing-module?
128 exn:fail:syntax:missing-module-path
153 syntax-local-lift-module
161 syntax-local-module-exports
214 current-module-declare-source
[all …]
/dports/lang/racket/racket-8.3/src/expander/boot/
H A Dcore-primitive.rkt74 syntax-source-module
75 identifier-prune-to-source-module
78 syntax-source
125 exn:fail:syntax:missing-module
126 make-exn:fail:syntax:missing-module
127 exn:fail:syntax:missing-module?
128 exn:fail:syntax:missing-module-path
153 syntax-local-lift-module
161 syntax-local-module-exports
214 current-module-declare-source
[all …]
/dports/lang/chez-scheme/ChezScheme-9.5.4/csug/
H A Dsyntax.stex853 The first syntax for \scheme{module} establishes a named scope that
858 The second syntax for \scheme{module} introduces an anonymous module
860 hidden module name) where the module form appears.
866 module.
890 the module.
946 (module mega-module (cons x y)
1045 (syntax-rules (module)
1086 (define-syntax define-module
1099 the module in the \scheme{define-module} form.
1121 (define-syntax abstract-module
[all …]
/dports/devel/rust-analyzer/rust-analyzer-2021-12-20/crates/ide_assists/src/handlers/
H A Dextract_module.rs68 if module.body_items.len() == 0 { in extract_module()
91 module.body_items = module.change_visibility(record_fields)?; in extract_module()
99 module.text_range, in extract_module()
101 let _ = &module; in extract_module()
645 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
662 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
679 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
696 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
713 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
730 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
[all …]
/dports/lang/rust/rustc-1.58.1-src/src/tools/rust-analyzer/crates/ide_assists/src/handlers/
H A Dextract_module.rs68 if module.body_items.len() == 0 { in extract_module()
91 module.body_items = module.change_visibility(record_fields)?; in extract_module()
99 module.text_range, in extract_module()
101 let _ = &module; in extract_module()
645 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
662 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
679 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
696 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
713 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
730 !selection_range.contains_range(source.value.syntax().text_range()); in does_source_exists_outside_sel_in_same_mod()
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/redex-lib/redex/private/
H A Dkeyword-macros.rkt28 (raise-syntax-error #f "expected a keyword" source (syntax kw))]
35 (raise-syntax-error #f "invalid keyword" source (syntax kw))]
38 (raise-syntax-error #f "repeated keyword" source (syntax kw))]
44 [else (raise-syntax-error #f "bad keyword argument syntax" source rest)])))
48 (define mpi/path/sym (syntax-source-module stx))
49 (define pth/sym (if (module-path-index? mpi/path/sym)
50 (resolved-module-path-name
51 (module-path-index-resolve mpi/path/sym))
58 #`#(#,(and (path? (syntax-source stx))
73 '#,(and (path? (syntax-source stx))
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/racket-doc/scribblings/reference/
H A Dstx-ops.scrbl39 @defproc[(syntax-source [stx syntax?]) any/c]{
68 of the @tech{syntax object} in its source, or @racket[#f] if the source
112 @defproc[(syntax-source-module [stx syntax?] [source? any/c #f])
115 Returns an indication of the module whose source contains
116 @racket[stx], or @racket[#f] if no source module for @racket[stx]
118 @racket[source?] is @racket[#f], then result is a module path index or
119 symbol (see @secref["modpathidx"]) or a @tech{resolved module path}; if @racket[source?] is true, t…
121 source in the sense of @racket[current-module-declare-source].
123 Note that @racket[syntax-source-module] does @emph{not} consult the
422 @defproc[(identifier-prune-to-source-module [id-stx identifier?])
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/scribble-lib/scribble/
H A Ddoclang.rkt7 (provide (except-out (all-from-out racket/base) #%module-begin)
8 (rename-out [*module-begin #%module-begin]))
12 (define-syntax (*module-begin stx)
15 #'(#%module-begin
40 #'body1 'module
55 module
56 module*
81 [(and (syntax-source loc-stx)
84 (syntax-source loc-stx)
87 [(and (syntax-source loc-stx)
[all …]
/dports/lang/racket/racket-8.3/collects/racket/
H A Drequire-transform.rkt20 ;; the import-source struct type:
21 import-source struct:import-source make-import-source import-source?
22 import-source-mod-path-stx import-source-mode)
32 (module-path? (syntax->datum path))))
33 (raise-argument-error 'make-import "(or/c module-path? module-path-syntax?)" path))
50 (define-struct* import-source (mod-path-stx mode)
53 (module-path? (syntax->datum path)))
54 …(raise-argument-error 'make-import-source "(and/c syntax? (lambda (s) (module-path? (syntax->datum…
285 [namess (syntax-local-module-exports mod-path)])
306 (list (make-import-source (if (equal? (syntax->datum #'simple) mod-path)
[all …]
/dports/lang/racket-minimal/racket-8.3/collects/racket/
H A Drequire-transform.rkt20 ;; the import-source struct type:
21 import-source struct:import-source make-import-source import-source?
22 import-source-mod-path-stx import-source-mode)
32 (module-path? (syntax->datum path))))
33 (raise-argument-error 'make-import "(or/c module-path? module-path-syntax?)" path))
50 (define-struct* import-source (mod-path-stx mode)
53 (module-path? (syntax->datum path)))
54 …(raise-argument-error 'make-import-source "(and/c syntax? (lambda (s) (module-path? (syntax->datum…
285 [namess (syntax-local-module-exports mod-path)])
306 (list (make-import-source (if (equal? (syntax->datum #'simple) mod-path)
[all …]
/dports/lang/racket/racket-8.3/doc/syntax/
H A Dblueboxes.rktd1412     #:source-reader read-syntax-proc     
1522   module-begin-form : syntax? = #'#%plain-module-begin
1666   source-stx : syntax?
1771       (and/c syntax? (compose module-path? syntax->datum))
1842 (build-source-location-syntax loc ...) -> syntax?
1848 (source-location-source loc) -> any/c
1871    #:source source      
1889 (syntax-source-directory stx) -> (or/c path? #f)
1892 (syntax-source-file-name stx) -> (or/c path? #f)
1897 (quote-srcloc form #:module-source expr)
[all …]
/dports/lang/racket/racket-8.3/share/pkgs/drracket/drracket/private/
H A Deval-helpers-and-pref-init.rkt177 (define (transform-module filename stx raise-hopeless-syntax-error)
181 (eq? 'module (syntax-e #'module))
190 (raise-hopeless-syntax-error "bad syntax in name position of module"
193 [mod (datum->syntax #'here 'module mod)]
204 (define ((make-with-mark special-source-handling) src-stx expr phase)
207 (define source
209 [(path? (syntax-source src-stx))
210 (syntax-source src-stx)]
211 [(special-source-handling (syntax-source src-stx)) => values]
218 [mark (vector source line column position span)]
[all …]

12345678910>>...1046