Skip to content

Commit

Permalink
renamed 'property' to 'attribute'
Browse files Browse the repository at this point in the history
  • Loading branch information
panicz committed Sep 11, 2024
1 parent 4b3bb71 commit 2c190ee
Show file tree
Hide file tree
Showing 27 changed files with 95 additions and 92 deletions.
2 changes: 1 addition & 1 deletion init/init.scm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-cache))
(import (language define-parameter))
(import (language fundamental))
Expand Down
2 changes: 1 addition & 1 deletion init/literki.scm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-cache))
(import (language define-parameter))
(import (language fundamental))
Expand Down
2 changes: 1 addition & 1 deletion src/editor/document/cursor.scm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-cache))
(import (language define-property))
(import (language attributes))
(import (language define-parameter))
(import (language keyword-arguments))
(import (language infix))
Expand Down
2 changes: 1 addition & 1 deletion src/editor/document/document-operations.scm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(import (language match))
(import (language examples))
(import (language infix))
(import (language define-property))
(import (language attributes))
(import (language fundamental))
(import (language keyword-arguments))
(import (language for))
Expand Down
2 changes: 1 addition & 1 deletion src/editor/document/documents.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(import (language define-type))
(import (language define-object))
(import (language define-parameter))
(import (language define-property))
(import (language attributes))
(import (language infix))
(import (language match))
(import (srfi :11))
Expand Down
7 changes: 5 additions & 2 deletions src/editor/document/history-tracking.scm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-parameter))
(import (language keyword-arguments))
(import (language mapping))
Expand Down Expand Up @@ -540,9 +540,12 @@
(car fronts)))))
))

(define-property+ (history document::pair)::History
(define-attribute+ (history document::pair)::History
(History document))

(define-attribute (last-save-point document)::list
'())

(define/kw (last-operation document::pair := (the-document))::Edit
(or (and-let* ((history ::History (history document))
(`(,front . ,_) history:fronts)
Expand Down
2 changes: 1 addition & 1 deletion src/editor/document/parse.scm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(import (language define-interface))
(import (language define-object))
(import (utils hash-table))
(import (language define-property))
(import (language attributes))
(import (language define-type))
(import (language keyword-arguments))
(import (language fundamental))
Expand Down
6 changes: 3 additions & 3 deletions src/editor/input/document-editor.scm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module-name (editor input document-editor))

(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-type))
(import (language define-parameter))

Expand Down Expand Up @@ -433,7 +433,7 @@
(transform:outside-in x y))

(define previously-edited
(property (document::Document)
(attribute (document::Document)
::Document
(or (and-let* ((`(,_ ,next . ,_)
(first-cell (is (car _) eq? document)
Expand All @@ -445,7 +445,7 @@
document)))

(define editing-context
(property+ (document::Document)
(attribute+ (document::Document)
::DocumentEditingContext
(DocumentEditingContext)))

Expand Down
4 changes: 2 additions & 2 deletions src/editor/input/evaluation.scm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(import (language define-object))
(import (language define-type))
(import (language define-interface))
(import (language define-property))
(import (language attributes))
(import (language define-parameter))
(import (language define-cache))
(import (language keyword-arguments))
Expand Down Expand Up @@ -42,7 +42,7 @@
(isnt (x:value) symbol?))
#t))))

(define-property (preserve-identity? item::Tile)::boolean
(define-attribute (preserve-identity? item::Tile)::boolean
#f)

(define-object (EvaluationContext)
Expand Down
2 changes: 1 addition & 1 deletion src/editor/input/gestures.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(import (language define-type))
(import (language define-parameter))
(import (language define-property))
(import (language attributes))
(import (language define-cache))
(import (language fundamental))
(import (editor interfaces painting))
Expand Down
2 changes: 1 addition & 1 deletion src/editor/input/pop-ups.scm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module-name (editor input pop-ups))

(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-type))
(import (language define-parameter))
(import (language fundamental))
Expand Down
4 changes: 2 additions & 2 deletions src/editor/input/screen.scm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(module-name (editor input screen))

(import (language define-property))
(import (language attributes))
(import (language define-syntax-rule))
(import (language assert))
(import (language define-interface))
Expand Down Expand Up @@ -50,7 +50,7 @@
(($bracket-apply$ ArrayList Layer)))

(define cursor ::(maps (Layer) to: Cursor)
(property+ (layer::Layer)::Cursor
(attribute+ (layer::Layer)::Cursor
(cursor-climb-front '() layer)))

(define (render!)::void
Expand Down
2 changes: 1 addition & 1 deletion src/editor/input/splits.scm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(module-name (editor input splits))

(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-type))
(import (language define-parameter))

Expand Down
6 changes: 3 additions & 3 deletions src/editor/interfaces/elements.scm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-parameter))
(import (language keyword-arguments))
(import (language match))
Expand All @@ -21,10 +21,10 @@
(import (language fundamental))
(import (editor interfaces painting))

(define-property (extent-cached? tile::Tile)::boolean
(define-attribute (extent-cached? tile::Tile)::boolean
#f)

(define-property+ (cached-extent tile::Tile)::Extent
(define-attribute+ (cached-extent tile::Tile)::Extent
(Extent width: 0 height: 0))

(define (extent+ tile::Tile)::Extent
Expand Down
4 changes: 2 additions & 2 deletions src/editor/types/extensions/extensions.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(import (language define-syntax-rule))
(import (language define-interface))
(import (language define-property))
(import (language attributes))
(import (language define-type))
(import (language define-object))
(import (language keyword-arguments))
Expand Down Expand Up @@ -334,4 +334,4 @@
(WARN "no extension for "keyword)
#f)))

(define-property (origin enchanted) enchanted)
(define-attribute (origin enchanted) enchanted)
22 changes: 11 additions & 11 deletions src/editor/types/extensions/visual-stepper.scm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(import (language define-object))
(import (language define-type))
(import (language define-interface))
(import (language define-property))
(import (language attributes))
(import (language define-parameter))
(import (language define-cache))
(import (language keyword-arguments))
Expand Down Expand Up @@ -198,7 +198,7 @@
at: level::int := 0
into:
measurements::(!maps (Element) to: Position)
:= (property+ (element ::Element)::Position
:= (attribute+ (element ::Element)::Position
(Position left: 0 top: 0)))
::(maps (Element) to: Position)
(let* ((p ::Position (measurements expression))
Expand Down Expand Up @@ -254,7 +254,7 @@
(define (extent) ::Extent maximum-extent)

(define shift ::(maps (Element) to: Position)
(property+ (element::Element)::Position
(attribute+ (element::Element)::Position
(Position left: 0 top: 0)))

(define (draw! context::Cursor)::void
Expand Down Expand Up @@ -283,11 +283,11 @@
(define (reduce expression
#!optional
(origin::(!maps (Element) to: (list-of Element))
(property (e)::(list-of Element)
(recons e '())))
(attribute (e)::(list-of Element)
(recons e '())))
(progeny::(!maps (Element) to: (list-of Element))
(property (e)::(list-of Element)
(recons e '())))
(attribute (e)::(list-of Element)
(recons e '())))
#!key
(context::EvaluationContext (default-context)))

Expand Down Expand Up @@ -557,10 +557,10 @@

(define-mapping (morph-to expression::Tile)::Morph
(Morph expression expression
(property (e::Element)::(list-of Element)
(recons e '()))
(property (e::Element)::(list-of Element)
(recons e '()))))
(attribute (e::Element)::(list-of Element)
(recons e '()))
(attribute (e::Element)::(list-of Element)
(recons e '()))))

(define/memoized (morph-from expression::Tile)::Morph
(let*-values (((reduced origins progenies) (reduce expression))
Expand Down
4 changes: 2 additions & 2 deletions src/editor/types/primitive.scm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-cache))
(import (language define-parameter))
(import (language keyword-arguments))
Expand All @@ -27,7 +27,7 @@
(import (utils conversions))
(import (editor types texts))

(define-property+ (id x)::int
(define-attribute+ (id x)::int
(override-size id))

;; we override Pair with Object's default equality and hash functions
Expand Down
8 changes: 4 additions & 4 deletions src/editor/types/spaces.scm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(import (language assert))
(import (language define-type))
(import (language define-interface))
(import (language define-property))
(import (language attributes))
(import (language define-object))
(import (language define-cache))
(import (language keyword-arguments))
Expand Down Expand Up @@ -631,7 +631,7 @@
(HeadTailSeparator)
(set! width width0))

(define-property+ (horizontal-bar width)
(define-attribute+ (horizontal-bar width)
(HorizontalBar (as real width)))

(define-object (VerticalBar height0::real)::Tile
Expand All @@ -657,10 +657,10 @@
(HeadTailSeparator)
(set! height height0))

(define-property+ (vertical-bar height)
(define-attribute+ (vertical-bar height)
(VerticalBar (as real height)))

(define-property (head-tail-separator cell)
(define-attribute (head-tail-separator cell)
head/tail-separator)

(define (empty? x)::boolean
Expand Down
2 changes: 1 addition & 1 deletion src/editor/types/texts.scm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-cache))
(import (language match))
(import (language examples))
Expand Down
4 changes: 2 additions & 2 deletions src/grasp-android.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-cache))
(import (language define-parameter))
(import (language keyword-arguments))
Expand Down Expand Up @@ -1566,7 +1566,7 @@
(define-object (GRASP)::Keeper

(define reaction-to-request-response
(property (request-code::int)::(maps (Object) to: void)
(attribute (request-code::int)::(maps (Object) to: void)
nothing))

(define last-request-code ::int 0)
Expand Down
2 changes: 1 addition & 1 deletion src/grasp-desktop.scm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(import (language define-interface))
(import (language define-type))
(import (language define-object))
(import (language define-property))
(import (language attributes))
(import (language define-cache))
(import (language define-parameter))
(import (language mapping))
Expand Down
2 changes: 1 addition & 1 deletion src/grasp-terminal.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

(import (language define-syntax-rule))
(import (language define-interface))
(import (language define-property))
(import (language attributes))
(import (language define-type))
(import (language define-object))
(import (language define-cache))
Expand Down
Loading

0 comments on commit 2c190ee

Please sign in to comment.