From b005e986c06681d98eb4f151147e96d8b5beddbb Mon Sep 17 00:00:00 2001 From: riton Date: Tue, 18 Mar 2025 15:38:40 +0300 Subject: =?UTF-8?q?node=20tan=C4=B1m=C4=B1,=20tan=C4=B1m=20dosyas=C4=B1na?= =?UTF-8?q?=20ta=C5=9F=C4=B1nd=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html-jen.lisp | 21 --------------------- "tan\304\261m.lisp" | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 "tan\304\261m.lisp" diff --git a/html-jen.lisp b/html-jen.lisp index 3eb5e54..fdae7ed 100644 --- a/html-jen.lisp +++ b/html-jen.lisp @@ -1,26 +1,5 @@ (in-package :html-jen) -(defun dosya-metni-oku (dosya) - (let* ((uzunluk 0) - (metin - (with-output-to-string (out) - (with-open-file (in dosya :external-format :utf-8) - (loop :with arabellek := (make-array 8192 :element-type 'character) - :for n := (read-sequence arabellek in) - :while (< 0 n) - :do (incf uzunluk n) - (write-sequence arabellek out :start 0 :end n)))))) - (values metin uzunluk))) - -(defclass node () - ((tag :initarg :tag :accessor tag :initform nil) - (children :initarg :children :accessor children :initform nil) - (props :initarg :props :accessor props :initform nil) - (value :initarg :value :accessor value :initform nil))) - -(defun node! (tag children props value) - (make-instance 'node :tag tag :children children :props props :value value)) - (defparameter *indent* 0) (defparameter *indent-increment* 2) (defparameter *yeni-satır* t) diff --git "a/tan\304\261m.lisp" "b/tan\304\261m.lisp" new file mode 100644 index 0000000..43af26c --- /dev/null +++ "b/tan\304\261m.lisp" @@ -0,0 +1,20 @@ +(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)) -- cgit v1.2.3