segabor / soykit Goto Github PK
View Code? Open in Web Editor NEWRuntime library for SoyKit
Runtime library for SoyKit
Currenty, Closure Templates compiler generates code that returns assembled output.
Replace it with a robust solution introducing Appendable protocol like below,
protocol Appendable {
func append(soyValue: SoyValue)
func append(safeContent: SanitizedContent)
func append(string: String)
}
So renderer signature will be changed to
(Appendable, [String:SoyValue], [String:SoyValue])
Tests are waiting proper implementation!
A general guide for Java based rendering is as follows:
SoySauce soySauce = new SoySauceBuilder().build();
SoySauce.Renderer renderer = soySauce.renderTemplate("com.codeandsoda.soytest.test");
String result = renderer.render().get();
System.out.println(result);
Create supporting types in SoyKit so we can write this piece easily in Swift.
Reference doc https://github.com/google/closure-templates/blob/master/documentation/codelabs/helloworlds/helloworld_java.md
/Users/segabor/Workspace/SoyFeatures/Sources/SoyFeatures/features_swift.swift:583:43: error: referencing operator function '<' on 'BinaryInteger' requires that 'SoyValue' conform to 'BinaryInteger'
if studentData278.get("year") < 2000 {
^
Swift.BinaryInteger:1:11: note: where 'Self' = 'SoyValue'
extension BinaryInteger {
Add message bundles support.
Reference: https://developers.google.com/closure/templates/docs/java_usage#creatingmessagebundles
Create Swift types for Soy. Below table describes Java types.
Template Type | Java Type |
---|---|
Null | (SoyData) null |
Boolean | boolean |
Integer | int |
Float | double |
String | String |
List | SoyListData |
Map | SoyMapData |
Support resolving data access like data["boo"]["goo"]
I realized that string values are not checked if they contain integer or floating point numbers. If so they can be treated as numbers so all arithmetics can be done with them.
Check and fix current implementation, particularly plus and minus operators.
Add compile-time globals support.
Reference: https://developers.google.com/closure/templates/docs/java_usage#globals
Check if the following module satisfies our needs https://github.com/slashmo/gsoc-swift-baggage-context/issues
Requirements: TBD
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.