Skip to content

Commit 73c19d6

Browse files
authored
Merge pull request #1519 from MitrahSoft/update_migrate.html
Updated migrate.from.classic-to-modern-local-scope.md to fix the Markdown issue.
2 parents ce61a3d + d203827 commit 73c19d6

11 files changed

Lines changed: 57 additions & 33 deletions

File tree

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
Specifies the maximum amount of time, in milliseconds, to wait for LDAP processing. Defaults to 60000 ms (60 seconds).
22

33
This was previously in seconds in Lucee 5, changed to match ACF since Lucee 6.0.0.170
4-

docs/03.reference/02.tags/pdf/_attributes/action.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- addWatermark
44
- deletePages
55
- extractText
6+
- extractBookmarks
67
- getInfo
78
- merge
89
- open
@@ -14,4 +15,7 @@
1415
- thumbnail
1516
- write
1617

17-
**Note:** action "thumbnail" was implemented from PDF Extension version - 1.1.0.8
18+
**Note:**
19+
20+
- The `thumbnail` action was implemented in PDF Extension version 1.1.0.8.
21+
- The `extractBookmarks` action was implemented in PDF Extension version 1.2.0.11-SNAPSHOT.

docs/recipes/ast.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ ast = astUtil.astFromPath("/test1.cfm");
9292
```
9393

9494
This approach is particularly useful when:
95+
9596
- Building extensions or plugins
9697
- Creating development tools
9798
- Performing batch analysis of multiple files
@@ -102,6 +103,7 @@ This approach is particularly useful when:
102103
The returned AST uses neutral, language-agnostic node types that follow ESTree conventions:
103104

104105
### Root Structure
106+
105107
```cfml
106108
{
107109
"type": "Program", // Root AST node
@@ -115,13 +117,15 @@ The returned AST uses neutral, language-agnostic node types that follow ESTree c
115117
### Common Node Types
116118

117119
**Expressions:**
120+
118121
- `BinaryExpression` - Operations like `x + y`, `a && b`
119122
- `UnaryExpression` - Operations like `!condition`, `-number`
120123
- `CallExpression` - Function calls like `myFunction(arg1, arg2)`
121124
- `MemberExpression` - Property access like `obj.property`
122125
- `ConditionalExpression` - Ternary operator `condition ? true : false`
123126

124127
**Literals:**
128+
125129
- `StringLiteral` - String values like `"hello"`
126130
- `NumberLiteral` - Numeric values like `42`, `3.14`
127131
- `BooleanLiteral` - Boolean values `true`, `false`
@@ -130,6 +134,7 @@ The returned AST uses neutral, language-agnostic node types that follow ESTree c
130134
- `ObjectExpression` - Struct literals like `{name: "value"}`
131135

132136
**Statements:**
137+
133138
- `IfStatement` - Conditional statements
134139
- `ForStatement` - Traditional for loops
135140
- `WhileStatement` - While loops
@@ -138,6 +143,7 @@ The returned AST uses neutral, language-agnostic node types that follow ESTree c
138143
- `FunctionDeclaration` - Function definitions
139144

140145
**CFML-Specific:**
146+
141147
- `CFMLTag` - CFML tags like `<cfquery>`, `<cfloop>`
142148
- `ClosureExpression` - Anonymous functions
143149
- `LambdaExpression` - Arrow functions
@@ -187,16 +193,19 @@ if (ast.type == "Program" && arrayLen(ast.body) > 0) {
187193
The AST functionality integrates well with various development scenarios:
188194

189195
### IDE Extensions
196+
190197
- Use AST for syntax highlighting
191198
- Implement intelligent autocomplete
192199
- Build refactoring tools
193200

194201
### Static Analysis Tools
202+
195203
- Detect code smells and anti-patterns
196204
- Enforce coding standards
197205
- Calculate complexity metrics
198206

199207
### Documentation Generators
208+
200209
- Extract function signatures and comments
201210
- Generate API documentation automatically
202211
- Create dependency graphs
@@ -208,6 +217,7 @@ A complete working example is available as a Docker setup:
208217
**Repository**: [https://github.com/lucee/lucee-docs/tree/master/examples/docker/ast](https://github.com/lucee/lucee-docs/tree/master/examples/docker/ast)
209218

210219
The demo includes:
220+
211221
- Docker Compose configuration with Lucee 7.0.0.299-SNAPSHOT
212222
- Example templates demonstrating both built-in functions and Java class usage
213223
- Ready-to-run environment for testing AST functionality

docs/recipes/java-scripting.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ For developers using AI assistance or requiring structured technical data, see t
3232
**[Java Scripting Technical Spec](https://github.com/lucee/lucee-docs/blob/master/docs/technical-specs/java-scripting.yaml)**
3333

3434
This YAML document contains pure technical facts optimized for:
35+
3536
- AI systems generating code implementations
3637
- Quick reference lookup of engine names, dependencies, and system properties
3738
- Tool consumption and automated integration
@@ -57,6 +58,7 @@ This YAML document contains pure technical facts optimized for:
5758
### Adding Lucee to Your Project
5859

5960
#### Maven Dependencies
61+
6062
```xml
6163
<dependencies>
6264
<!-- Lucee Core -->
@@ -76,6 +78,7 @@ This YAML document contains pure technical facts optimized for:
7678
```
7779

7880
#### Gradle Dependencies
81+
7982
```gradle
8083
dependencies {
8184
implementation 'org.lucee:lucee:6.0.0.677-SNAPSHOT'
@@ -458,8 +461,6 @@ spec:
458461
restartPolicy: Never
459462
```
460463
461-
462-
463464
## Advanced Integration Scenarios
464465
465466
### AWS Lambda Integration

docs/recipes/migrate.from.classic-to-modern-local-scope.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Modern mode offers several advantages:
3838

3939
Consider this component when running in Classic mode:
4040

41-
```javascript
41+
```cfml
4242
component {
4343
function createToken(id) {
4444
token = createUUID(); // Stored in variables scope
@@ -76,13 +76,13 @@ Or:
7676

7777
### 3. Application Level (Application.cfc)
7878

79-
```javascript
79+
```cfml
8080
this.localMode = "modern"; // or "classic"
8181
```
8282

8383
### 4. Function Level
8484

85-
```javascript
85+
```cfml
8686
function test() localMode="modern" {
8787
// Function body
8888
}
@@ -134,25 +134,25 @@ Variable Scope Cascading Write Detected: The variable [token] is being implicitl
134134

135135
For each occurrence, decide whether to:
136136

137-
1. **Add explicit variables scope** (if the variable should remain in the component's variables scope):
137+
1. **Add explicit `variables` scope** (if the variable should remain in the component's variables scope):
138138

139-
```javascript
140-
variables.token = createUUID();
141-
```
139+
```cfml
140+
variables.token = createUUID();
141+
```
142142

143-
2. **Add explicit local scope** (if the variable should be function-local):
143+
2. **Add explicit `local` scope** (if the variable should be function-local):
144144

145-
```javascript
146-
local.token = createUUID();
147-
```
145+
```cfml
146+
local.token = createUUID();
147+
```
148148

149149
### Common Patterns Requiring Attention
150150

151151
#### Component Properties
152152

153153
Properties meant to be stored at the component level need an explicit variables scope:
154154

155-
```javascript
155+
```cfml
156156
// Before
157157
function init(datasourceName) {
158158
datasourceName = arguments.datasourceName;
@@ -168,7 +168,7 @@ function init(datasourceName) {
168168

169169
Variables that should be local to a function call:
170170

171-
```javascript
171+
```cfml
172172
// Before
173173
function processItems(items) {
174174
result = [];

docs/technical-specs/ast.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ builtin_functions:
99
keywords: ["ast", "transform", "compile"]
1010
signature: "struct astFromPath(any path)"
1111
return_type: "struct"
12-
12+
1313
astFromString:
14-
function_name: "astFromString"
14+
function_name: "astFromString"
1515
class: "lucee.runtime.functions.ast.AstFromString"
1616
keywords: ["ast", "transform", "compile"]
1717
signature: "struct astFromString(string cfmlCode)"
@@ -28,14 +28,14 @@ supported_input_types:
2828
path_parameter:
2929
- "String (relative/absolute path)"
3030
- "java.io.File"
31-
- "lucee.commons.io.res.Resource"
31+
- "lucee.commons.io.res.Resource"
3232
- "File stream (from fileOpen())"
3333
string_parameter:
3434
- "String containing CFML code"
3535

3636
file_extensions:
3737
template: "cfm"
38-
component: "cfc"
38+
component: "cfc"
3939
script: "cfml"
4040

4141
ast_standard:
@@ -48,7 +48,7 @@ root_node:
4848
properties:
4949
- "type: string"
5050
- "start: position_struct"
51-
- "end: position_struct"
51+
- "end: position_struct"
5252
- "sourceType: string"
5353
- "body: array"
5454

@@ -70,15 +70,15 @@ core_node_types:
7070
- "ElvisExpression"
7171
- "ClosureExpression"
7272
- "LambdaExpression"
73-
73+
7474
literals:
7575
- "StringLiteral"
7676
- "NumberLiteral"
7777
- "BooleanLiteral"
7878
- "NullLiteral"
7979
- "ArrayExpression"
8080
- "ObjectExpression"
81-
81+
8282
statements:
8383
- "ExpressionStatement"
8484
- "IfStatement"
@@ -95,7 +95,7 @@ core_node_types:
9595
- "BlockStatement"
9696
- "FunctionDeclaration"
9797
- "VariableDeclaration"
98-
98+
9999
cfml_specific:
100100
- "CFMLTag"
101101
- "Parameter"
@@ -180,4 +180,4 @@ cast_expression_structure:
180180

181181
output_format:
182182
structure: "Nested Lucee Struct"
183-
encoding: "UTF-8"
183+
encoding: "UTF-8"

docs/technical-specs/java-scripting.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ engine_discovery:
1010
primary_name: "CFML"
1111
aliases: ["CFM"]
1212
engine_name: "Lucee"
13-
mime_types:
13+
mime_types:
1414
- "text/cfml"
1515
- "application/cfml"
1616

@@ -45,7 +45,7 @@ ant_integration:
4545
</script>
4646
4747
system_properties:
48-
cli_call:
48+
cli_call:
4949
name: "lucee.cli.call"
5050
value: "true"
5151
description: "Set automatically for CLI usage"
@@ -69,4 +69,4 @@ implementation_details:
6969
servlet_context: "Creates ServletContext/ServletConfig for standalone operation"
7070
working_directory: "Directory where java command was called from"
7171
dialects: ["script", "tag"]
72-
default_dialect: "script"
72+
default_dialect: "script"

examples/docker/ast/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ services:
44
volumes:
55
- "./www:/var/www"
66
ports:
7-
- 8888:8888
7+
- 8888:8888

examples/docker/ast/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ This Docker setup demonstrates Lucee's Abstract Syntax Tree (AST) functionality
55
## Quick Start
66

77
1. Start the container:
8+
89
```bash
910
docker compose up -d
1011
```
1112

1213
2. Open your browser:
14+
1315
```
1416
http://localhost:8888
1517
```
@@ -19,15 +21,18 @@ http://localhost:8888
1921
The demo shows two ways to generate AST from CFML code:
2022

2123
### Built-in Functions
24+
2225
- `astFromPath()` - Parse CFML files into AST
2326
- `astFromString()` - Parse CFML code strings into AST
2427

2528
### Java Class Integration
29+
2630
- `lucee.runtime.util.AstUtil` - Direct Java class access for advanced usage
2731

2832
## Example Output
2933

3034
The AST is returned as a structured representation using neutral node types following ESTree conventions:
35+
3136
- `BinaryExpression`, `StringLiteral`, `NumberLiteral`
3237
- `IfStatement`, `ForStatement`, `FunctionDeclaration`
3338
- CFML-specific nodes like `CFMLTag`

examples/docker/couchbase/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ services:
2222
- couchbase_data:/opt/couchbase/var
2323

2424
volumes:
25-
couchbase_data:
25+
couchbase_data:

0 commit comments

Comments
 (0)