blockly > BasicCursor > getNextNode_
طريقة BasicCursor.getNextNode_()
يستخدم هذا الأسلوب اجتياز الترتيب المُسبَق للتنقّل في AST في Blockly. سيسمح ذلك للمستخدم بالتنقل بسهولة في Blockly AST بالكامل بدون الحاجة إلى الدخول والخروج من مستويات الشجرة.
Signature:
protected getNextNode_(node: ASTNode | null, isValid: (p1: ASTNode | null) => boolean): ASTNode | null;
المعلمات
المَعلمة |
النوع |
الوصف |
عقدة |
ASTNode | خالية |
الموضع الحالي في AST |
isValid |
(p1: ASTNode | null) => boolean |
دالة صحيح/خطأ استنادًا إلى ما إذا كان يجب عبور العقدة المحدّدة |
المرتجعات:
ASTNode | null
العقدة التالية في التنقّل.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-11-08 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-11-08 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `BasicCursor.getNextNode_()` method uses pre-order traversal to navigate the Blockly Abstract Syntax Tree (AST)."],["This method enables easy navigation of the entire Blockly AST without complex level changes."],["`getNextNode_()` accepts a current node and a validation function to determine traversal eligibility."],["It returns the subsequent node based on the defined traversal logic."]]],["The `getNextNode_()` method, part of the `BasicCursor` class, navigates a Blockly Abstract Syntax Tree (AST) using pre-order traversal. It takes two parameters: `node`, the current AST position, and `isValid`, a function determining if a node should be traversed. It returns the next `ASTNode` or null. This enables users to traverse the entire AST sequentially without manually managing tree levels.\n"]]