spudplate
Template scaffolding compiler for spudlang .spud files
Loading...
Searching...
No Matches
spudplate::FileStmt Struct Reference

A file statement - creates or appends to a file. More...

#include <ast.h>

Public Attributes

PathExpr path
 File path expression.
 
std::optional< std::string > alias
 Optional as <name> binding; empty if no as clause.
 
FileSource source
 Where the file content comes from.
 
bool append
 If true, append; otherwise create/overwrite.
 
std::optional< int > mode
 Optional permission bits.
 
std::optional< ExprPtr > when_clause
 Optional condition guarding creation.
 
int line
 1-based source line where this node begins.
 
int column
 1-based source column where this node begins.
 

Detailed Description

A file statement - creates or appends to a file.

Example: file "{slug}/README.md" content "# " + name