<?xml version="1.0"?>
<syntax name="espresso.CoreEdit.Snippets">
    <zones>
		<zone name="placeholder">
			<expression>\$((0|[1-9][0-9]*)|([a-zA-Z0-9_]+))</expression>
			<capture number="2" name="number"/>
			<capture number="3" name="variable"/>
		</zone>
		<zone name="placeholder">
			<expression>\${((0|[1-9][0-9]*)|([a-zA-Z0-9_]+))}</expression>
			<capture number="2" name="number"/>
			<capture number="3" name="variable"/>
		</zone>
		<zone name="placeholder.with-default">
			<starts-with>
				<expression>\${((0|[1-9][0-9]*)|([a-zA-Z0-9_]+)):</expression>
				<capture number="2" name="number"/>
				<capture number="3" name="variable"/>
            </starts-with>
            <ends-with>
            	<expression>}</expression>
            </ends-with>
            <subzones name="default-container">
            	<include syntax="self" />
            </subzones>
		</zone>
		<zone name="placeholder.with-transformation">
			<starts-with>
				<expression>\${((0|[1-9][0-9]*)|([a-zA-Z0-9_]+))/</expression>
				<capture number="2" name="number"/>
				<capture number="3" name="variable"/>
            </starts-with>
            <ends-with>
            	<expression>/([a-z])?}</expression>
				<capture number="1" name="transformation.options"/>
            </ends-with>
            <subzones>
            	<zone name="transformation.search">
					<starts-with>
						<expression>(?&lt;=/)</expression>
		            </starts-with>
		            <ends-with>
		            	<expression>(?=/)</expression>
		            </ends-with>
		            <subzones name="expression" />
				</zone>
            	<zone name="transformation.replace">
					<starts-with>
						<expression>/</expression>
		            </starts-with>
		            <ends-with>
		            	<expression>(?=/)</expression>
		            </ends-with>
		            <subzones name="expression" />
				</zone>
            </subzones>
		</zone>
		<zone name="shell">
			<starts-with>
                <expression>`</expression>
            </starts-with>
            <ends-with>
            	<expression>`</expression>
            </ends-with>
            <subzones name="command" />
		</zone>
		<zone name="escape">
			<expression>\\(.)</expression>
			<capture number="1" name="escaped-string"/>
		</zone>
    </zones>
</syntax>
