Files
html-jen/tanım.lisp
2025-03-18 15:38:40 +03:00

21 lines
863 B
Common Lisp
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(in-package :html-jen)
(defclass node ()
((tag :initarg :tag :accessor tag :initform nil
:documentation "HTML element tag keyword'ü")
(children :initarg :children :accessor children :initform nil
:documentation "Bu node'un altındaki node'lar")
(props :initarg :props :accessor props :initform nil
:documentation "HTML element attribute'ları ve değerleri")
(value :initarg :value :accessor value :initform nil
:documentation "HTML element metin içeriği")))
(defun node! (tag children props value)
(make-instance 'node :tag tag :children children :props props :value value))
(defun ebeveyn-node! (tag children &optional props)
(make-instance 'node :tag tag :children children :props props))
(defun çocuk-node! (tag value &optional props)
(make-instance 'node :tag tag :props props :value value))